A relay is basically an electrically controlled mechanical switch. Inside that harmless looking plastic box is an electromagnet that, when it gets a jolt of energy, causes a switch to trip.

Components REQD.:

 

1) SPDT 5V Relay

2) LED x2

3) 330 Resistor x2

4) P2N2222A Transistor

5) Diode 1N4148

6) Jumper Wires