For some reason kids are fascinated with their ears and will often put things in there - peas or beads or all kinds of different things. I'm Dr. Allen Greene and let's talk about how to get things out of the ear when they go in.
If there is a pea or a bead or a small toy that's gone into the ear and you can see it there, then take a pair of tweezers, turn the head to the side, gently grasp it and pull it out. If you can't see it though and you suspect there is something in there, it's time for a trip to the doctor. They have the tools to see be able to see it and better tools for pulling it out.
Now a couple special cases:
What happens when a bug crawls into the ear? It does happen. Same thing applies. If you can see it, pull it out with tweezers. If you can't though, there is a trick you could use. If you turn the head to the side and put a few drops of baby oil in, often that will bother the bug enough that they'll come up to the surface where you can grab it with the tweezers.
The other thing is kids will sometimes put a Q-tip down deep in the ear or even a pencil down deep in the ear digging around. And it's not a problem getting it out, but they scream in pain because something got hurt. They can rupture their eardrum with things they put in there. If there is pain when something goes into the ear, that's another time to take them to the doctor. Often it will heal well on its own, but it should definitely be checked.