Diesel engines use glow plugs to warm the combustion chambers. The glow plug relay controls this high-draw system. When you turn the key, the computer triggers the relay to send power to the plugs. After the engine starts, the relay cuts power to prevent the plugs from melting.
Corroded terminals or internal switch failures prevent power from reaching the plugs. Without functioning glow plugs, a diesel engine will crank endlessly in cold weather and fail to start.