You have to learn all about relays! They are not that hard to figure out.
The most commonly used relays for automotive stuff are the Bosch SPDT relays. Those are the black cubes that are about 1" square. The smaller grey ones do the same thing, however they can't handle as much current.
Now when I do wiring, I buy mounting blocks that the relays plug into. That way it's easy to remove and replace a damaged relay.
What's real cool about the mounting blocks is that you can connect them together as an assembly.
Here is the diagram of the large (normally used) Bosch relays;
Here is the diagram of the smaller relay;
So, how do the work and what can they do?
A relay is nothing more than a switch that is operated by a magnetic coil.
Look at the diagram for the 151 relays and I'll explain what does what.
The coil is between terminals 85 and 86. If you have 12 volts on one terminal and ground on the other, then current flows through the coil and that makes a magnetic field that "picks" the relay. It doesn't take a lot of current to energize the coil and as such can be operated with a small switch.
If the relay is not "picked", then current can flow through terminal 30 to terminal 87a.
If the relay is picked, then current can flow through terminal 30 to terminal 87.
That's pretty much it!
If you want to see a whole bunch of uses for relays, go to "the12volt.com" site.