See:
- http://www.bcae1.com/relays.htm

Basic setup is that 85 and 86 are the coil that turns the relay on and off. Two ways that is connected typically, one is that you ground pin 86 (for example) and supply power (12 volts) to pin 85 via some sort of switch (the thermoswitch for example). The other typical connection is that pin 85 is wired to 12 volts and pin 86 is connected to ground via a switch to turn the relay on.

The to supply power to the fan motor, pin 30 is connected to 12 volts and pin 87 is connected to the fan motor and the other side of the fan motor is connected to ground.