A relay is a type of electromechanical switch used in power supplies, counting systems and many other applications. It is used to control a large current with a small current. Most relays require a small continuous voltage to stay on. A latching relay is different. It uses a pulse to move the switch, then stays in position, slightly reducing the electric power requirement.
The latching relay has a small metal strip which can pivot between two terminals. The switch is magnetized, or attached to a small magnet. On either side of that magnet are small coils of wire called solenoids. The switch has an input and two outputs at the terminals. It can be used to turn one circuit on and off, or to switch power between two different circuits.
The two coils are used to control the relay. When electric current flows into the coils, it generates a magnetic field, which turns off again when they do. Because the magnetic strip is suspended between the two coils, it is also subject to their magnetic field. When the circuit generates a pulse of electricity through the coils, it pushes the switch from one side to the other. The strip stays there until it receives a magnetic pulse in the opposite direction, pushing the switch back to the other terminal.