Relay:
In some of the electronic devices, it is not convenient to place a switch exactly where it should be placed. For instance, you might want to switch a communications line from one branch to the other from a long distance away. In the various radio transmitters, the wiring carries high frequency alternating currents which should be kept within the certain parts of the circuit, and not routed out to front panel for switching. A relay makes use of the solenoid to allow remote control switching.
A diagram of a relay is shown in the Figure given below. The movable lever, called as armature, is held to one side by the spring when there is no current flowing through electromagnet. Under these conditions, the terminal X is connected to the terminal Y, but not to Z. When a sufficient current is applied, the armature is pulled over the other side. That disconnects the terminal X from terminal Y, and connects X to Z.
There are various types of relays used for various purposes. Some are meant for use with direct current, and others are for alternating current; a few will work with the either type of current. A normally closed relay completes circuit when there is no current flowing in the electromagnet, and breaks the circuit when the current flows. A normally open relay is opposite. Can be used either as a normally open or closed relay, depending on which contacts are chosen. It can be used to switch the line between 2 different circuits.
Some relays have different sets of contacts. Some relays are to remain in one state for a long time, while others are meant to switch many times per second. The fastest relays work a number of times per second. These are used for the purposes as keying the radio transmitters in Morse code or radio teletype.