Most electrical appliances are connected to the mains using a three-core cable. The insulation round each wire is colour coded so the wires are easy to identify: the live wire is brown, the neutral wire is blue and the earth wire has green and yellow stripes.
The live wire carries the alternating potential difference from the supply. The potential difference between the live wire and earth is about 230 V. The neutral wire completes the circuit and is at, or close to, earth potential, which is 0 V. The earth wire is a safety wire that stops the appliance becoming live. It is at 0 V and only carries a current if there is a fault.
A live wire may be dangerous even when a switch in the mains circuit is open. If the switch is in the neutral wire, opening it leaves the live wire connected to the appliance at about 230 V, so touching it could let current pass through you to earth.
Any connection between the live wire and earth is dangerous. The live wire is at about 230 V and earth is at 0 V, so a large current can flow, which can cause an electric shock or a fire.