Unplug the lamp's power cord from the socket.
Unscrew the light bulb and set it aside for reuse if it is not burned out. Unscrew the heavy plastic or metal retainer nut on the light bulb socket with a screwdriver then remove the lamp shade.
Twist the metal socket cover 1/4-turn counterclockwise and slide it upward to remove. Remove the cardboard insulation sleeve underneath to expose the socket and three-way switch.
Pull gently on the socket and switch assembly to release it from the base. On some lamps, there may be a small set screw on the side of the base that must be loosened with a screwdriver to release the socket and switch.
Loosen the screws that hold the two electrical wires to the socket. Make a note of the position of the black and the white wires on the two screws. Unwrap the wires from the screw posts.
Wrap each wire around the screw post of the new three-way socket and switch then tighten each screw. The wires must not touch each other or the opposite screws.
Lower the new socket and switch into the lamp base and align the socket with the notch on the base.
Slide the insulator tube over the new socket and place the socket cover over the insulator.
Set the lamp shade over the socket and slide the retainer nut over the socket. Screw the retainer nut onto the threaded base.
Screw in the three-way light bulb and plug in the lamp's power cord.