Cellular respiration is more or less a reverse process of photosynthesis. During cellular respiration complex carbon compounds, especially the carbohydrate molecules break down into carbon dioxide, releasing energy. This is a catabolic reaction. Fats and proteins also undergo catabolic reactions. The energy released is used by the living system for various activities. To be more precise, energy released during biological oxidation of the complex carbon molecules such as carbohydrates fats and protein, is trapped by the organism into adenosine triphosphate (ATP).
ATP is a high-energy phosphate, which can be stored in the cell. From this stored 'ATP, energy, can be tapped instantaneously. This is the source of energy for various activities of organisms. The electrons released during the process are passed on through a series of electron carriers in the electron transfer chain within the mitochondria where essentially hydrogen and oxygen combine to for& water. You would have studied more about these aspects in Cell Biology.