Twist the bare ends of the wire, hook them clockwise around the terminals and screw them down. Put the socket inside the sleeve, and the sleeve inside the cover. Push the cover back down on the base and orient the switch in the desired direction. If the lamp still doesn't work, it's a good idea to have a professional take a look at it. The plug end of a lamp or appliance cord may pull lose of it's cord connection.
Replacement is fairly easy, however.
The plug pulls apart by squeezing the prongs together. Feed the end of the plug through the back of the cover. Spread the prongs apart and insert the wire into the back of the core. Squeeze the prongs together. They have small metal spikes that penetrate the cord's insulation to make contact with the copper wires inside.