A relay is an electrically operated switch. Learn how to wire a 4 or 5 pin relay with our wiring diagrams and understand how relays work. The control voltage then energizes the relay s electromagnet.