ATP generation occurs primarily in the mitochondria through oxidative phosphorylation. This process involves the electron transport chain and the chemiosmotic gradient. Glycolysis, which occurs in the cytoplasm, and the citric acid cycle, which takes place in the mitochondrial matrix, also contribute to ATP production. These processes rely on nutrients like glucose, fatty acids, and amino acids.