Wiring a relay involves connecting the relay to the accessory, the switched power, the battery and the ground, all in separate steps. Each step requires a separate wire, and the steps must be done in a particular order. First connect the relay to the battery. Next connect the relay to the accessory. Then connect the battery to the switched power. Finally, ground the relay. Begin the process with the switched power turned off.
Wiring a relay for motorcycle accessories is a good example:
First turn off the power source (the ignition). Next find a place for the relay. Hook a length of 12- to 14-gauge wire with a ring connector on one end to the positive battery terminal. Hook the other end of the wire with a spade connector to terminal three on the relay.
Now, put another spade terminal on the power wire coming from the accessory. Using small-gauge black wire, put a spade terminal on one end, and hook that to relay terminal two. Put a ring connector on the other end of the black wire, and attach it to the battery's negative terminal. Take a longer piece of small-gauge wire, and attach a spade connector to one end. Then hook that wire to relay terminal one.
Find a reliable source of switched power for the other end of the wire hooked to terminal one. Make sure you select a wire that is on all the time, such as the ignition.
Once everything except terminal five is hooked up, turn on the motorcycle ignition and test terminal five. It should read "+12V." If you have a reading of +12 volts, turn off the ignition, hook up the accessory power to terminal five, turn the ignition back on, and check your work.