Shut off the electricity to the socket, either by turning off the circuit breaker or removing the fuse in the fuse box that controls the circuit in an older building.
Take out the slotted screw in the center of the socket's cover plate. Remove the cover plate and save the screw.
Extract the screw in the bracket at the top and bottom of the socket to release the part from the metal box inside the wall. Save these screws for reuse in Step 8.
Pull gently on the socket and turn it at an angle to inspect the side where the white and black wires attach to screws on the socket. Make a note of which wire is attached to each screw.
Loosen the screws holding the wires. You will typically need a Phillips-head screwdriver to loosen these screws.
Pull each wire off the screw post. Discard the old socket.
Wrap the bare end of the black wire under the corresponding screw head on the new socket and tighten the screw. Wrap the white wire below the remaining screw head and tighten the screw. The wires cannot touch each other.
Insert the newly wired socket into the metal box in the wall. Fasten the top and bottom brackets with the screws removed in Step 3.
Place the cover plate over the new socket and secure it with a screw through the hole in the center.
Turn on the electricity.