Many electrical outlets in your home are ground fault circuit interrupter (GFCI) models. These will automatically shut off power if there is a short in the line protecting lives. But older models may need testing to ensure they are working properly. It is a safety measure for you home to test these periodically and replace when needed. Consult with an electrician when replacing them.
GFCI outlets should have a test button on them. It is best to use a small nightlight as your primary tool to test your GFCI outlets. Push the reset button on your outlet. Plug in the nightlight. The light should go on.
Then push the Test button on the outlet. If the GFCI is working, the nightlight should go off. If it does not, you should contact an electrician to replace these outlets to provide shock protection.
We found a great video that explains this from the Electrical Safety Foundation.