Relay
A relay uses current in a coil to create an electromagnet that moves its contacts. The coil circuit is electrically separate from the switched circuit. In this changeover relay, COM is the common contact. With the coil off, COM connects to NC (Normally Closed); NO (Normally Open) is disconnected. Energizing the coil switches COM to NO. When coil power stops, a spring returns it to NC. A separate supply powers the lamps: the coil only moves the switch.
Match the coil voltage and contact ratings to the circuit. To control a bare DC relay from Arduino, use a suitable transistor driver and a correctly connected flyback diode across the coil; do not connect the coil directly to an Arduino pin. Check the manufacturer’s pinout.
The keeper at SparkVille’s waterwheel sends a small control signal to the town gate. A relay switches its signal lamps: one says “Wait!”, the other “Come on through!” The keeper stays by the wheel, and the gate gets the message.