Electrical wires are quite specific with their colour codes. Each colour of the wire specifies the task that wire is used for. In India, wires are assigned the RGB colour code i.e. red, black and green. Each colour wire has a distinct objective.
The red colour of the wire indicates a phase in the electric circuit. It is the live wire. It is mostly found in switch lag and cannot be joined with the black or the green wire. Switch lag is the wire that is seen appearing from the lower side of the switch, and it’s temperature increases when the switch is turned on.
It is meant for switching the load off and on.
The black colour of the wire indicates neutral wire of the electrical circuit. These wires are connected to the neutral bus bar that is inside the electrical board. A bus bar is meant for disbursing the electrical current after drawing it. It is a conductive metallic bar. There is no scope of connecting a black wire to any other colour wire except black because it is neutral in nature and does not carry any charge or current.
The black wire is meant for taking unbalanced load i.e. the extra load which is not used back to the electrical board.
The green wire in meant for grounding or earthing in an electric circuit. It is only supposed to be connected to a green wire and no other colour wire. Grounding is not for lights and fans and is only usually for sockets of AC, geyser, TV, microwave, etc.
Switches for lights and fans have only two wires neutral and live.
There are several sockets in the modern interior design that are used by homeowners
The wire from all the sockets that is supposed to be grounded is joined at one point and then grounded using a copper rod/screw that is connected to the distribution box on either side. The wires from all the distribution boxes move to the society meter box and then finally to the ground bus bar. The ground bus bar is the copper plate that is placed deep in the ground. This is known as earthing or grounding in common man's language. The green wire is meant to make a way to carry the electric current of the circuit.
It is more important in situations when a live wire present inside the circuit touches a metal and carries a lot of currents. In these situations, they should be handled with utmost care.