A ground wire links the external body of an electrical appliance to the Earth which is a large conductor.
The function of a ground wire can be explained in a better way by taking an example.
Let us consider a washing machine. There is a large motor in the washing machine with a high power rating. Under ideal conditions, adequate insulation in the machine prevents any voltage from being created on the outer metallic box in which the motor is enclosed. If the insulation is damaged or water enters the engine a path of conduction is created that leads to a voltage being created on the outer body of the washing machine.
If you were operating the machine and touched it, you will experience a shock as current passes through your body into the Earth.This can be very dangerous.
Therefore it is essential to have a ground or Earth wire that connects the outer body of the machine to the Earth and ensure that even if anything were to go wrong and a voltage created on the outer surface it is quickly dissipated and the user does not suffer any harm.