Electricity is not something to mess around with.  When you have electrical problems, in most cases it makes sense to call a professional electrical contractor.

However, you may occasionally come across problems that you might be able to handle yourself.  For example, you may be able to replace a wall socket or light switch.   You can follow these steps.

  1. Shut off the electricity.  While this may seem obvious, you’d be surprised.  Shutting off the electricity means shutting off the circuit breaker controlling that switch or outlet.  To be safe, after you think you have shut off the right breaker, test it to make sure.  If you are not sure which is the right breaker, you can shut off the main breaker.  This will cut off all power to the house, but at least you know you are safe.
  2. Remove the cover plate.  Put the screws on a table or other location so you can be sure to find them.
  3. Remove the switch or outlet from the electrical box.  Pull it out with the wires still attached.
  4. Note how the wires are connected.  Draw a diagram or take a digital picture to be sure.  Or you can label the wires by writing something on masking tape such as the color of the terminal or screw to which it is connected, and attaching the tape to the wire.  Do this for sockets and switches, as well as GFCI receptacles.  Note that all these are designed with one conductor per terminal.
  5. Remove the wires. 
  6. Attach the wires to the new receptacle.  Use your diagram, or picture, or the masking tape, to make sure you connect the wires to the correct terminals.   Wrap the wires clockwise around the screws.  Then tighten the screws.  Then push the wires gently back into the electrical box.  Screw the wall socket or switch back into the electrical box, and then replace the plate.
  7. Turn the electricity back on.  Test the wall socket or switch to make sure it is functioning properly.

If you are not sure, stop.  Many receptacle outlets can have multiple wires attached, as well as stab in the back connections.  If you make a mistake, the results can be expensive to fix, not to mention dangerous.  In these instances, it makes sense to call a professional electrician.