Table lamp switches can break from the constant rotation created when turning the lamp off and on. Rather than throwing out your lamp, replace the switch by replacing the socket. The switch is actually a part of the socket and is a much easier replacement than trying to repair the switch on its own. You can save your lamp and save money by repairing it instead of replacing it.
Remove the lamp shade and the light bulb from the lamp. Remove the harp from the lamp by squeezing the sides of the harp toward the socket and lifting it up and out of the harp base. The harp is the part of the lamp that holds the shade.
Grasp the exterior socket sleeve in your hand, and pull up and away from the socket base. The exterior socket shell may require some slight force to pull it up and out.
Pull the interior socket switch from the socket base to access the socket switch wiring. Once the wiring is exposed, use a screwdriver to loosen the screws on each side of the interior socket, and remove the wires from beneath the screws. Discard the old interior socket.
Install the new interior socket switch. Feel the lamp wires. One lamp wire is ribbed or rough; wrap this wire around the silver screw on the side of the new socket switch. The remaining wire is smooth and wraps around the copper screw on the opposite side of the socket switch. Tighten both screws to hold the lamp wires securely in place.
Slide the exterior socket sleeve back over the interior socket, pushing it firmly into place. Replace the lamp harp, the light bulb and the lamp shade.