Relays are used to handle heavy electrical loads in cars. Devices in vehicles such as fans, headlamps, horns, wipers, ignition, air-conditioning etc. draw huge amounts of current to operate.
Most car systems run off of a 12V battery. A small direct switch can handle 5 or 10 amps safely. This is far less than the amount of current drawn by many of the devices in the car. If a switch is used to handle such a device there will be a big drop in voltage draining the battery and overheating the circuit.
In such cases, a relay is needed. Relays are generally designed to handle 30-40 amps of current. Some heavy duty relays for fans, headlamps etc. also handle 70-80 amps of current. A relay is therefore basically like a big electrically operated switch to handle large loads.
How to choose a relay for your car
Physical size
You have to make sure that the relay size and weight are suitable where it is to be installed.
Pin number and arrangement
A Relay has several pins or terminals for its contact points. The right pin configuration is important.
Coil voltage
Relays generally are rated for 12V supply but they can come in 6V, 24V ratings as well depending on the vehicles electrical system. Large trucks may have a 24V battery.
Coil resistance
Relays draw a nominal amount of current which can be calculated by Ohm's law where the Relay coil current is the Supply voltage divided by the relay coil resistance, The electrical circuit should be able to supply enough current required by the relay coil.
Current
Relays can be of various current ratings. While many devices can be handled by relays of 30 - 40amps, some devices need more heavy duty relays that can handle currents of 70amps
Switch contact arrangement
Relays can have various contact arrangements such as Single Pole Single Throw (SPST), Single Pole Double Throw (SPDT), Double Pole Double Throw (DPDT). They can also be referred to as as "single pole changeover" (SPCO) or "double pole changeover" (DPCO)
More info on relay functions and uses
More info on relays