In the electron transport chain, electrons released from the break down of NADH to NAD and FADH to FAD pass through electron carrier proteins, releasing energy as they do. This energy is used to pump H+ ions across the inner mitochondrial membrane.
A hydrogen ion gradient is established across the membrane, and H+ ions move down this membrane by passing through ATP synthase where they are used to produce ATP.
The electrons from the ETC are accepted by oxygen. H+ ions that have passed through ATP synthase bond with the oxygen that accepted the electrons to form H2O