Everyone thinks they know what a switch is, and many think the same about relays. However, in electrical engineering, the precise meaning is more complicated as there are 58 different symbols in use to denote different kinds of switches and relays.
Even in common usage, the word “switch” has different interpretations. You can switch something on or off, or you can switch something over – from one way of operating to another. The switching may be performed manually, remotely, electrically (in the form of relays), or triggered by a timer or sensor.
Switches may have one or more sets of contacts. Each will be connected to an external circuit, and each will either be “closed” (on) or “open” (off). Spring tensioning usually secures them in either of these states. Toggle switches are the most familiar and will lock in either position.
Less common are “push button” or “momentary” types that are locked in one position and swap to the other after being depressed by a finger. Some are used to temporarily open or close a circuit, while others do both on alternate presses. Switches that send or interrupt current only momentarily are often used to send signals to another circuit – for example, a keyboard power button.
Switches can be operated either by human mechanical action or by a mechanical motion. An example is the limiting switch that is tripped when a garage door reaches a fully open or closed position to stop its motor at that position. Limit switches are heavily used on automated production lines.
Finally, many switches are operated by changes in environmental variables like temperature, pressure, flow rates, current, light, or voltage. Without sensor switches, most modern technology would be impossible.
You can see a selection of switches and electrical control components at http://www.osmelectrical.com/.
A relay is a switch operated by another electrical circuit. Relays were originally developed by telegraph companies as repeaters and amplifiers for Morse code. A signal arriving on one circuit triggered the same signal in a second circuit that would then deliver it to the next relay point.
Relays often use electromagnetism to operate remote switches, but they can also control semi-conductors in combined circuits with no moving parts.
A very important use of relays today is within protective devices that cut circuits in response to impending surges and overloads, or breakers.