Foods contain energy values.
See the following table for some energetic values. They are usually found in calories (lime) or kilocalories (Kcal).
ENERGY VALUE (Cal / g)
These "energy values" correspond to the energy released in the chemical reactions of the metabolism of these foods in the body.
If we say that chocolate has a lot of calories, we really mean that in the reactions of chocolate metabolism in the body, there is a lot of energy release.