If you go to unscrew a lightbulb, either from a lamp or a wall or ceiling fixture, and the whole socket moves without releasing the bulb, it means your socket has come loose in its setting. Don't continue twisting, as you could pull out the wiring and make the problem worse. Before you can tighten the socket, you have to get the bulb out, which can be a challenge. It's best to remove it intact, but not always possible.
Things You'll Need
Pliers large enough to encircle the base of the socket
Thick canvas gloves with a no-slip rubber palm coating
One small potato
Unplug the lamp. If the socket is part of a wall or ceiling fixture, turn off the power at the circuit breaker.
Put on your goggles. Set your pliers to a wide enough setting to encircle the socket base. Set the pliers in place. Hold the base firmly, but don't squeeze it so much that it bends or crimps the metal.
Wearing your non-slip glove on, gently twist the bulb counter-clockwise, while holding the socket steady with the pliers, until it comes loose.
If the bulb cracks or breaks while turning it, use your gloved hand to break away the rest of the glass, until there's just a short border of broken glass jutting out of the socket.
Cut a potato in half, and press the cut side directly over the broken glass of the socket. Press down hard enough that the glass is embedded and the potato is down to the metal of the socket.
Continue holding the socket firmly with the pliers as you twist the potato counter-clockwise, until the bottom metal section of the bulb comes out in the potato.
As a last resort, if the bulb base simply will not come out, unscrew the lamp head or light fixture base, disconnect the wires that hold in the socket, and discard the socket with the bulb base still in it. Re-wire a new socket in its place.
Never work on an electrical fixture with the power on.