One of cortisol's main functions is to "counterregulate" (resist) the action of the "regulatory" hormone insulin.
Insulin facilitates the movement of glucose out of the bloodstream and into liver, muscle, and fat cells. Counterregulation reduces the amount of glucose that can be moved into liver and muscle cells, and this does two important things. First, it increases the amount of glucose in the bloodstream (this increases the amount of glucose available to brain and fat cells). Secondly, counterregulation deprives liver and muscle cells of glucose they might otherwise have received.
When counterregulation raises our blood glucose levels, our insulin levels rise. There is always some cortisol in the blood, so there is always some counterregulation. Stress, hunger, and infection, all increase counterregulation.
When counterregulation is chronically high, it's called insulin resistance. When you are insulin resistant, your metabolism is disrupted and you burn more fat and less glucose. You would think that burning more fat would be a good thing, but it isn't. When you are insulin resistant, you will almost always make fat faster than you can burn it.
Burning extra fat year after year "poisons" your muscle and liver cells in such a way that they remain insulin resistant even when you reduce your cortisol levels. This condition is called metabolic syndrome.
Counterregulation, insulin resistance, and metabolic syndrome are intermediate causes of obesity and type 2 diabetes.
Pleasant, enjoyable exercise reduces cortisol, counterregulation, and insulin resistance, so many people find that they feel better after they get their walking shoes on and drag their butts out the door for a long, pleasant walk. Just don't walk to a donut shop.