An electrical switch is any component that interrupts or controls the flow of electrons in a circuit. Switches are binary devices. When they are on (closed), they create a short and close the circuit so current can flow. In their off (open) state, they prevent current from flowing and look like an open circuit.
There are several types of switches, including mechanical, solid-state, reed, momentary, latching, and tactile, to name a few. The key factors to take into account when selecting a switch are the switching function, force required to activate the switch, mounting and packaging, and the maximum current and voltage ratings of the switch.