From Wikipedia:
A protective earth connection ensures that all exposed conductive surfaces are at the same electrical potential as the surface of the Earth, to avoid the risk of electrical shock if a person touches a device in which an insulation fault has occurred. It ensures that in the case of an insulation fault (a "short circuit"), a very high current flows, which will trigger an overcurrent protection device (fuse, circuit breaker) that disconnects the power supply.
From Russ Andrews:
House Earthing
Upgrading your house earthing is very worthwhile. Much of the noise problem commonly experienced in Hi-Fi systems is caused by poor earthing. There are four ways that your property might be earthed, and these are listed below:
Earth Bonding Clamps to Water Main Pipe
If you live in an older property it will probably be relying on earthing to the incoming cold water supply pipe using earth bonding clamps (see diagram below). However, if the earth bonding clamps are inadequate or dirty then instead of being an effective 'earth' the earthing and cross-bonding becomes an 'aerial' for noise, spikes and RFI. If your water main pipes and connections are non-metallic, non-conductive plastic ones, a different earthing method is needed, using an earth spike.
In a properly earthed system the gas and water supply pipes and any other exposed metalwork are bonded to earth. Check that your system has all these main and supplementary bonding conductors; install any that are missing.
Earth Spike (earth electrode) from the Earth Connection Block
Sometimes the house is earthed via an earth spike (a 4ft copper or copper clad steel rod) that is connected to the earth connection block (see fuseboard diagram here) and placed in the ground (outside or in the basement). You may discover that your home has this in addition to one of the other earthing methods.
Connection from Cut Out Block to an Earth Connection Block
In most urban houses a connection is provided from inside the Electricity Board's cut-out block to an earth connection block (see fuseboard diagram here). This provides an effective path to earth along the metal sheath of the main service cable to the substation where it is connected to earth.
PME (protective multiple earth)
Many modern homes, and those in country areas, are provided with a kind of earthing called PME. The earth current is fed back to the electricity substation along the neutral return wire, connected to earth at frequent intervals along its length.
System Earthing
It is very beneficial to provide a good clean earth for a Hi-Fi system. A good earth gives cleaner, deeper bass and a more stable soundstage.
Chassis and Signal Earthing
Whilst it is true that all items in a system are interlinked via the signal grounds on the interconnect cables, this is not the same as good chassis or 'star' grounding. Confusing chassis earthing and signal earthing will degrade bass performance and often causes hum. In principle all the hardware chassis (casework) should be connected independently to one main earth point, and there are instructions on doing this here.
Signal grounds are usually connected to chassis grounds via a resistor to prevent hum induction into the signal.
Occasionally, when a system is connected together, a hum is heard coming from the speakers. This is often described as an 'earth loop'. See 'What you can do' below for how to deal with this problem.
What you can do:
Do check the earthing you have in your home, it is there to protect you from an electric shock in the event that an appliance should go faulty. A number of customers have discovered to their horror (and ours) that they had no cross bonding at all in their house wiring systems.
Check the cross-bonding
Even if you have no apparent problems, it is wise to check all the cross bonding connections between water pipes, etc.
You will find them attached to all exposed pipe work beneath sinks, baths etc. They get loose in time, and dirt and corrosion ruin the earth contact. Slacken each clamp, slide it along the pipe line an inch or so, clean the place it was on with wire wool and DeoxIT contact enhancer, move it back and re-tighten.
Install an Additional earth spike(s)
An earth spike (earth electrode) is a 4ft copper or copper clad steel rod made to be driven into the ground. If you don't already have one, you can improve your general house earthing by adding an earth spike from the earth connection block (as described below). Improving your Hi-Fi system earthing by the addition of one or more earth spike is also very beneficial.
Click here for instructions on fitting an additional earth spike for your Hi-Fi
Solving an earth loop problem
The usual advice is to remove the earth wire in the mains plug of the offending piece of hardware. This solution may break the 'loop' and silence the hum but it is usually only hiding the symptom not curing the cause.
One of the most common causes of the problem is hum induced into the chassis of the equipment by its mains transformer (see the article on Electromagnetic Fields). If your equipment has only two wire connection (ie no earth wire) you may gain an improvement in performance by connecting an earth to a chassis screw. Sometimes this adds a 'buzz' into the sound but if it doesn't then you will get more 'solid', stable sound and better bass. Experiment!