Earthing is defined as the process in which the instantaneous discharge of electrical energy takes place by transferring charges directly to the earth through a low resistance wire.
In this case device is connected to the earth with the help of a conducting wire so that we can prevent shock.