Earthing is the process of creating an alternative path for the flow of fault/excessive currents safely into the ground in the presence of minimal resistance or impedance.
The primary purpose of earthing is to reduce the risk of serious electric shock from current leaking into uninsulated metal parts of an appliance, power tool, or other electrical devices. In a properly earthed system, such leaking/fault current is carried away harmlessly while tripping the fuse. Earthing also provides protection from large electrical disturbances like lightning strikes and power surges. It also aids in the dissipation of hazardous static electrical charges.
Although most electrical systems have fuses or circuit breakers for protection against a fault current, the human body may be fatally electrocuted by a current of less than one ampere which is well below the point at which a fuse or breaker will operate. Earthing helps minimise such hazards from occurring.
Earthing is basically a metal conductor which goes into the ground near the structure. It helps in the efficient discharge of all the fault currents/ surge currents present in the electrical system. It also helps in dissipating the high voltages which are passed on through the lightning arrestors atop buildings.