A relay is an electrically operated switch
In electronics, a switch is an electrical component that can break an electrical circuit, interrupting the current or diverting it from one conductor to another....

. Many relays use an electromagnet
An electromagnet is a type of magnet in which the magnetic field is produced by the flow of electric current. The magnetic field disappears when the current is turned off...

 to operate a switching mechanism mechanically, but other operating principles are also used. Relays are used where it is necessary to control a circuit by a low-power signal (with complete electrical isolation between control and controlled circuits), or where several circuits must be controlled by one signal. The first relays were used in long distance telegraph circuits, repeating the signal coming in from one circuit and re-transmitting it to another.