The cooling fan relay is a switch. When the engine gets hot, the computer sends a low-current signal to the relay. This closes the internal contacts, sending high-current power directly to the radiator fan. Without this relay, the fan would draw too much current through the engine computer or dashboard switches, melting them.
Relays burn out over time due to high heat and current loads. If the relay sticks closed, the fan will run constantly and drain the battery. If it stays open, the fan won't run at all, making the engine overheat when idling.