Cortisol is often misunderstood. Produced by the adrenal glands, the hormone plays a critical role in regulating metabolism, blood sugar, inflammation, immune function, and the body's response to stress. Far from being harmful, cortisol is essential for survival.