Where energy comes from is a complex issue. The body has several different energy systems, and switches between them several times a day.
Food is typically digested fairly slowly (simple carbs in 20 minutes, complex carbs in 2 hours, fats in 5 hours, protein in 7-8 hours), and the body can also convert fat to usable energy only slowly,
For the more intense demands of exercise, fat and digestion just can't keep up with the demands of the muscle, so most of the energy for exercise comes from glycogen stored in the muscles and liver. Typically the body stores around 2000 calories in usable energy, and is easily able to cope with the demands of a workout.
As disgestion continues after your workout, that energy then goes into replacing your glycogen reserves, and if this isn't enough, the body will also tap its fat reserves to make up the difference.
Where energy is coming from at any one point in time is irrelevant - what matters for weight loss is the overall balance between calories burned and consumed over the entire 24 hour day. If you run a calorie deficit, at some stage the body will have to tap its fat stores to make up the difference.
I have a question I was hoping someone could answer and explain to me about exercising and calories. When you are exercising and burning up calories what calories get burned up first? Is it food that our bodies has already stored or do we burn up calories from food we just ate recently?