Relays are switches controlled by electrical power, like another switch, computer or control module. The purpose of an automotive relay is to automate this power to switch electrical circuits on and off at particular times.
However, the real benefit behind a relay is more than just automation; they also provide the ability to switch multiple circuits, including different voltage types, within the same relay at the same time.
Automotive relays of all shapes and sizes can be found in just about every car, truck, and even boats. Relays in general are used to enable a low amperage circuit to switch on or off a higher amperage circuit, like turning on your headlights.
If you were to try and directly hook up your headlights to the headlight switch you would exceed the amperage rating of the switch, melt wires, and risk an electrical fire. Relays are also used to switch multiple things at the same time using one output. A single output connected to multiple relays will allow you to open continuity and/or close continuity simultaneously, for example turning on your radio while the antenna extends.