GFCIs work by detecting slight variations in current. If a short occurs, a GFCI will trip in a fraction of a second.
There are three types of GFCIs:
GFCIs should be installed where water is present (such as in bathrooms and kitchens), or where easy contact with the ground can be made. However, even with GFCIs, you must still exercise extreme caution around water.
Never modify or bypass a GFCI. Test GFCIs periodically to see that they are working properly. Do this by pressing the red "Test" button on each GFCI.