A relay is used for one of two purposes.
First: This is most common in automotive use... A remote switch sends a small current to the relay,, The relay can then switch a much higher current.
For example. 5 amps to the coil 100 amps to the starter (The Starter Solenoid is in fact a relay).
This also works when you are using a low current (power) transistor to switch a larger current (the blower motor on your furnace)
It can also be used for "Automatic transfer" two cases of this, One is the Auto-Transfer-Switch that selects either Shore Power or Generator power, the actual switch is a bank of relays.
or in a Magnnetek 6300 there is an isloator relay that isolates the battery and charger circuit from the converter circuit, a very bad design in my opinion.
But it is basically either a remote switch or a way to make a small current control a much larger current.
The most common failure mode is dirty/pitted contacts, followed by welded contacts and finally coil failure.