A relay is an electrically operated switch that uses a small current to control a larger current. It was invented in 1835 and works by using an electromagnet to attract or repel a lever, opening or closing the switch contacts. Relays have two positions - normally open or normally closed - depending on the position of the contacts when the coil is not energized. They are commonly used to switch higher voltages or currents than simple solid-state switches can handle and can control multiple circuits at once.