"Grounding" or "Earthing" performs two distinct operations. Firstly, let's tackle "old" style systems with just fuses.
An earth wire, connected to the metal case of a device, provides a low resistance connection between than case and the neutral point of your home circuit. Depending on the earthing system used in your area that could be a direct connection to the neutral wire in your property, or to the neutral point at the power substation, or at other points in between.
A fault developing in the device which causes the case to become live then has a path back to neutral through earth which causes a large current to flow. This current is enough to blow the fuse in the fuse box, or the plug, or the internal fuse in the device, etc. That then isolates the power making the device safe again.
There are certain standards in place that define when you must have an earth connection and when you can get away without having one (look up "Double Insulated" for instance).
So the earth wire is there mainly to cause the system to shut off the power before you have a chance to touch the device and get a shock.
Now, on newer installations, and in certain safety situations (depending on your local regulations) you will have RCDs and ELCBs - Residual Current Devices and Earth Leakage Circuit Breakers (note: Americans call an RCD a GFCI). These are far far more sensitive than the traditional fuse.
The ELCB works kind of like a traditional fuse in that it requires the earth wire to work. But, instead of it causing a huge current to flow it instead watches what current is flowing on the earth wire, and if it sees enough current, usually just a few mA, the it shuts off the power. Normally there should be virtually no current flowing through the earth wire, so if any is detected then it must be a fault. These are most often used with things like lawn mowers where there is a good chance you may cut through the cable.
RCDs monitor the difference between the live and neutral currents. If there is a difference between them then it shuts the power off. A difference can occur when either current is flowing down the earth wire or through someone's body to ground (and back to the neutral point through the earthing system).