Glycogen is simply your muscles carbohydrate stores, and what it breaks down for energy when you workout. During high intensity exercise such as weightlifting, your body uses these sugar stores to convert into ATP (energy) to perform the work. If you have ever worked out without eating for a long period of time and you noticed your muscles fatigued very quickly, or you couldn't perform the normal amount of sets/reps you typically do, then it's possible your glycogen stores were low.
So when we perform an exercise session, whether it be cardio or weightlifting, we deplete our muscles of glycogen and then have to eat in order to replenish. It takes time to replenish glycogen in your muslces (several hours) so if you perform a long cardio session, and don't eat... or if you don't give your body enough time after you eat to replenish the glycogen, then your performance may suffer.
This is of course a very brief explanation, because bioenergetics (how the body produces energy) is actually an extremely complicated topic.