What you need is:
- Soldering Iron
- A desoldering tool or some solder wick
- Some solder
First you need to locate where the pins are soldered to the board. You need to remove all the solder from these joints.
If you have a desoldering pump (it looks a bit like a syringe with a sprung piston inside it and a release button on the side), this is the easiest way. Heat the pins until the solder has melted, keep the soldering iron on the joint, then at the same time touch the tip of the desoldering pump to the pin and press the button. This will instantly suck all the solder off the pin and into the tool.
If you have solder wick, this absorbs the solder by soaking it up into the wick. This won't remove it all though.
When you've got most of the solder off all the pins, nudge the pins with the tip of a screwdriver to release them from any final solder bonds, and you should be able to lift off the socket unharmed.
Do the same to the faulty socket, replace with the good one, and resolder.