ATP is generated through cellular respiration that is involve glycolysis followed by citric acid cycle but in case of aerobic exercise or any exercise that involves low to intense exercise that requires high oxygen.
If the lack of sugars occurs after an intense exercise for a long time, fat mobilization from adipose tissue takes place.