This process is known as chemiosmosis in which there is a movement of ions across semipermeable membrane. Hydrogen ions moves from region of its higher concentration to the region of lower concentration. As this process belongs to the diffusion or osmosis of water molecules across cell membrane that is why known as chemiosmosis.
ATP synthase is an enzyme which function is to form ATP by using free energy generated in result of movement of hydrogen ions.
During cellular respiration, glucose is broken down in the presence of oxygen to produce carbon dioxide and water. Energy released during the reaction is captured by the energy-carrying molecule ATP (adenosine triphosphate).