A relay is an electromechanical switch that can switch higher voltages or higher currents using a lower voltage and/or current. It works by using an electro magnet to manipulate.
Relays exist in multiple types but the most commonly used one is the single pole dual throw. This means that when the relay is not powered the C and NC (normal connected) pins are connected. When the coil is powered, the switch is thrown and the C and NO (normal open) connection are connected.