For safety reasons, make sure the lamp is unplugged before rewiring it. When taking the lamp apart, look for a button that says, "press here," which allows the socket to slide out without needing to be removed with a flat-head screwdriver.
Rewiring a lamp is a relatively simple job that requires only a few basic tools and a lamp rewiring kit. To complete the job, you need a screwdriver and a pair of wire cutters.
Once the lamp is unplugged, remove the old light bulb. If the socket does not have a button, insert the screwdriver between the socket and the base, and gently pry it out. With the socket in one hand, trim the old wires with the wire cutters. To remove the cord, turn the lamp upside down, unscrew the nut, and pull the cord through the bottom of the lamp base.
To rewire the lamp, install the parts in the kit in the reverse order. First, thread the new cord up through the base of the lamp, and then attach it to the new socket. Before connecting the new wires, split them by cutting along the indentation, and remove 1 inch of insulation, using the wire cutters. Using an underwriter's knot, tie the split wires together. To connect the wires, pry open the socket sleeve, and wrap each of the wires around a screw. If needed, tighten the screws before replacing the sleeve.