After a long period of use, the socket in a lamp can stop working. This can be caused by the socket itself wearing out. Sometimes the socket is still functional, but the switch has failed. Both of these issues can be remedied by replacing the socket assembly.
Unplug the lamp and remove the shade and light bulb.
Once these have been set aside, you can start the process of removing the old socket. On many lamps, this will require that you replace the entire assembly including the switch. You need to examine the socket to see how it is attached to the lamp.
Look for a screw on the part of the socket that attaches to the tube running through the lamp.
On most lamps sockets, there is set screw that holds the socket to the conduit that allows the wire to pass through the body of the lamp. You need to remove this screw. Before you unscrew the socket from the top of the lamp, grip the socket just above the switch. Pull upward while rocking the socket gently back and forth. You should see the socket start to pull apart.
Inside the socket, you will see two wires coming out of the lamp.
If these wires are too short to allow you to lift the upper part of the socket free, you will need to remove the covering from the bottom of the base of the lamp. Inside the base of the lamp, you will need to release the wire so that it can freely move up into the lamp body. This may require you to untie a knot in the wire and or remove a fitting from the base of the lamp.
Once the wire is loosed from the base of the lamp, the socket should come apart.
If you cannot get the socket to separate from top to bottom, you may have to remove the entire socket from the lamp before proceeding. If the socket separates with no problem, loosen the two screws on the inside of the socket and remove the wires. Unscrew the rest of the assembly from the lamp.
Take the new socket assembly apart.
Feed the end of the lamp wire through the bottom of the assembly. Screw the this part onto the conduit of the lamp. Use the set screw to fasten it in place. Wrap the end of one wire around each screw on the upper part of the assembly. Tighten the screws to make a firm connection. Push the top of the socket assembly back into the bottom. Be careful to feed the wire back down through the body of the lamp as you do this.
Reassemble the base of the lamp.
Put the wire back in the base in the same way that you found it when you removed the bottom of the lamp base. Put the bottom of the base back into place. Reinstall the light bulb and shade. You should be ready to plug the lamp in and start to use it.