A switch is a component that uses an electrical signal to actuate, operate or control a mechanical action. Alternatively, switches may use a mechanical action to control an electrical signal.
Typically an electromechanical device, switches include components like relays, pushbuttons, valves, solenoids - even more distinct components like motors or circuit breakers operate with switch-like characteristics.
These types of devices use the principles of electromagnetism, where the influence of a magnetic field, generated when current passes through a coil, activates a switch. When current is applied to devices like relays or solenoids, a magnetic field forces contacts to open or close to complete or interrupt a circuit. Likewise, pressing a button or pulling a lever can manually open or close a circuit.