The pediatrician answers:
If you know -- or suspect -- your child has a foreign body in his/her nose or ear, take him or her to their doctor or to the emergency room. If the pediatrician, family physician, or ER doctor cannot remove the object, the child can be referred to an ENT specialist.
What the parent should not do is panic. Trying to remove the object yourself may accidentally make the situation worse, so I don't generally recommend it unless the object is very easy to grasp and easy to remove.