How earthing prevents electrical shocks and fault?

The internal live parts and outside metal chassis of electrical equipment are insulated and provide protection against electrical shock by direct contact.
In case of an insulation fault, the equipment’s metal chassis potential becomes that of the supply voltage, and hence a potential difference with respect to ground (0V) is created. Thus if there is no proper earthing and protection, when a human being touches this chassis, as a result of the potential difference across the body, a current will pass from the chassis to earth via the human body causing a potentially lethal electric shock. (Human body can be also considered as a conductor with resistance of approx. 1000 / 3000Ω)

If the metal case is earthed, the fault current flow is divided. Thus the majority of the fault current flows through the earth protective conductor and into the ground since the earth path resistance is designed to be much lower than the resistance of the human body. (N.B. Current flow is inversely proportional to the resistance value). Thus only a small amount of harmless current flows through the body.

Automatic disconnection of the power supply is required where a risk of harmful physiological effects to a person may arise due to a fault as a result of the value and duration of a dangerous touch voltage.

The proper coordination and design of earth system (or fault impedance) together with the protective device (RCD, MCB, Fuse) will ensure the automatic disconnection of the power supply.