It is formed by the breakdown of complex molecules like Carbohydrates, Lipids, and Proteins in the process of cellular respiration of the mitochondria.
All the substrates are broken down to glucose which then undergoes cellular respiration to liberate ATP.