A basic automotive 4 or 5 pin relay is composed of two halves. One half is a basic electromagnet that will be powered by 12 volts in almost all situations. One of these connections is 12v power, the other is ground. In a Bosch style relay the 12v connection to the coil is numbered with an 86, and the ground for the coil is numbered with an 85.
The other half is a simple switch that makes an electrical connection when the electromagnet pulls a gate shut. In the Bosch style relay, the "input" will be numbered with a 30, and the N.O. (normally open) connection will be numbered with an 87. A 5 pin relay adds pin 87a, which is also known as the N.C. (normally closed) position.
Note: If you ignore pin 87a on a Bosch 5 pin relay you'll have
Going into a little more detail, the electromagnetic coil that's connected to pins 85 and 86 on bosch style relays may also come with a device called a diode between pins 85 and 86. This means that you can only connect pin 85 to a ground source, and pin 86 can only be connected to a power source. Cheaper relays will not have this diode inside, so pin 86 or 85 can be used as ground, and the remaining of the two pins can be used as power.
Sometimes a 5 pin relay is needed in order to give the user the option to have the relay make a connection when it is not being powered between pins 30 and 87a. The relay can also be wired in "reverse" so pin 87 is the input and pin 30 powers a device. Or two separate power sources (one on 87a and another on 87) and each can power a device via pin 30. I go over some advanced examples on the other page here.
Subscribe to my YouTube channel , browse the webpage tabs across the top, OR just scroll my YouTube Playlists here .