An electric relay is a switch that is electrically controlled. They may be energized using either AC or DC power sources.
A relay is really a solenoid that is designed to specifically function as a switch. To recall, a solenoid is a long, helical wire that has many loops, and a relatively strong and uniform magnetic field inside of it. A piece of iron may be placed inside to strengthen the field, as is the case of a relay. A relay therefore is an electromagnetic switch.
Relays are mainly used for remote switching, and for high voltage or high current switching. They are particularly valuable because they can control these high voltages and currents with only a small voltage or current in return. Another important usage is for AC power lines. Relays function as AC power switches, and keep the control signals electrically isolated.
There are numerous types of electric relays. For example, latching relays have two bistable or relaxed states. Stepping relays are also called rotary switches, because the contact arm can rotate. Reed relays have coils wrapped around reed switches, and mercury wetted relays have contacts with mercury on them. Solid-state relays don't have moving parts.
The typical relay operates by pulling in a movable member when there is enough current flow. This movable member is called an armature.
Relays are useful as switching mechanisms for pinball machines, telephone stations, automobiles, and more.