Inspired from a physical design, a switch is a binary toggle. Meaning, it can either be on or off. In interfaces switches generally act as selection mechanism, example: checkbox and radio button are switches with on/off states used to highlight a selection/deselection of the associated value.
In the physical realm, a switch is an electronic device which is used to complete a circuit. Is also acts as a binary toggle with on/off states.