A relay has numbers allocated to each pin, usually as follows:
30 - Power In, power from the battery
85 - Earth, connected to chassis or battery
86 - Switch, connected to the wire used to swith the relay on (eg cig power, acc wire)
87 - Power Out, will supply power when swith is activated
87a -...