We've all had a light bulb break leaving part of the bulb, the base, still stuck in the socket. Some people say that inserting a carrot and turning it will help with this calamity. This is like an old wives tale or something. Even if you have the right size carrot it still doesn't work! Do yourself a favor and just use a pair of needle-nose pliers to slowly remove the bulb base, as described below.
Obviously, before you attempt to take out the broken bulb base, make absolutely sure to unplug the lamp it's in or, if wall mounted, flip the curcuit braker off at the box. If the light was on for a long time, wait a while before you start so you don't burn yourself.
Grab the thin metal edge of the bulb base with just the tip of the needle-nose pliers and slightly jiggle it while turning. Then move your pliers about half an inch around and jiggle it slightly while turning, again. Keep going; it just takes patience. Done!
Of course I recommend the new-fangled light bulbs insead of the old type. Buy them here: