An earth wire is a safety wire. It connects the metal parts of appliances to the earth. The earth wire conducts the excess current to the earth, thereby reducing the risk of accidents.
It is necessary to earth the metallic bodies of electric appliances to avoid the risk of electric shocks. To do this, we connect the earth wire to the metal body of an electrical appliance using a three-pin plug. By doing so, the metal body always remains at zero potential. In case the live wire touches the metal body of the appliance, the current passes directly to the earth through the earth wire. It does not need our body to pass the current; thus, we do not get an electric shock.