To install the wrings of any switches, be it a one gang or a two gang switch, we have to understand first how a electrical circuit works. The electrical current we use in our house is called alternating current or AC. This means the current flows continuously alternating from point A to point B in a continuous loop. Once this loop is broken and the flow of current is disrupted at any point of the loop, the circuit stops to work.
We can imagine the flow of current like a rubber band. It must be a continuous. Now the purpose of the switch is to open or close this loop. So if we put a switch within any point of the loop we have the power to close or open the loop at will.
We can make a simple circuit by running a wire from the Mains and then back. In between this circuit there will be the switch and then the lights. The circuit is completed when the current is directed back the Mains after passing through both these devices. The most important factor is the light. Without passing the current through a light bulb or any another apparatus a short circuit will happen and the consequences could be serious. So don’t ever try running a live circuit yourself. This is just to give you a rough idea of how a circuit can be controlled by a switch.
The reason we see at least two wires inside any given switch is because one is coming from the main and the other is going to the light. It is actually a single piece of wire being cut off at that point and closed and opened by that switch. The wires comes from the main, runs to the switch, up to the light and back to the mains.
If there are two lights then there will be two wires running up to the light, so that is the reason you will see at least 3 wires behind a 2 gang switch. Thus, the number of wires behind the multi gang switches will depend on the number of lights you have.