To replace a wall socket, turn off the power to the outlet, unscrew the old socket cover and the outlet itself, free the wires, then attach the wires to the new socket and screw everything back into place. To do this safely and effectively, have a voltage tester, wire cutter, wire stripper, screwdriver and new outlet on hand before beginning.
The San Francisco Chronicle advises that before you start working on an outlet, to go to the breaker box, wherever it is located, and turn off power to the whole room. Once this is done, remove the plate that covers the outlet. The outlet itself is screwed in separately. Before unscrewing that, be sure to test the wires leading to it with a voltage meter. This is especially true if the outlet wasn't working before.
Once you are sure that no power is going to the outlet, unscrew the outlet and pull it from its receptacle box. The wires leading to the outlet are also held on with screws, which you can detach. If any wiring looks singed, cut off the damaged portion and strip the wire to expose 1 1/2 inches. Screw the white wire into the silver post and the black wire into the brass post, then screw in your new outlet and cover.