What is the function of the switch in the circuit ?
A switch simply opens a circuit, stopping the flow of electricity. For example: a simple circuit would be two wires from a battery, one of which goes to a switch, and the other goes to a light bulb. A third wire goes from the other side of the switch to the other conductor of the light bulb. With the switch closed the circuit is complete and the light goes on. Open the switch and the circuit is broken and the light goes off.