Glycogen is a pretty complicated molecule that’s used in long-term energy storage. When you eat a meal that has carbohydrates in it, your blood glucose levels rise. To stabilise the levels, the pancreas releases insulin. This also has the effect of stimulating the production of various enzymes, one of which is involved in creating glycogen. It’s then stored until your body needs energy, at which point it’s converted back into glucose so you can use it up!