The energy that fuels you comes from the chemical bonds of carbs, fats, and proteins. Let me back up to before the food is food for a sec. Originally, the energy from food is a product of photosynthesis. Plants use energy from the sun to produce glucose (among other things). They trap solar energy that is generated from sharing electrons in chemical bonds. So photosynthesis yields compounds with MORE energy contained in the chemical bonds of the products than the building blocks (carbon dioxide and water). The energy for this uphill process comes from the sun. Your body transforms the electrical energy found in carbs, fats, proteins, into other forms
1. Chemical energy to transform carbs
2. Mechanical energy to move muscles
3. Electrical energy to drive nerves
4. Osmotic energy to maintain ion balance between cells
Guess what the byproducts of this are? Yep...carbon dioxide and water (which are the building blocks of the plant). See the connection? Now you know the circle of life.
The function of your metabolism is to take these chemical bonds from your food, and convert them into something you can use...one of those things being ATP.
In carb metabolism, it all starts with Glycolysis. There are two ways to make ATP. Either fuel molecules supply the energy OR trapping light energy by means of photosynthesis. As humans, we can obviously only do the first. The carbs you eat get converted, eventually, to Glucose...the most simple of all sugars. Through the process of glycolysis (breaking down glucose), your body uses glucose and existing ATP to spark further processes and yield other molecules to make energy. Your body uses 2 ATP to GO THROUGH glycolysis (the process itself has to be fueled), and then it MAKES 4 ATP. 4 ATP made, 2 ATP used to make them, yields 2 ATP total. This is all from one molecule of glucose.
So that's how it goes from the garden, to the animal, to your plate, to your body, and so on...
Does that answer your question?