The electron transport chain is located in the inner mitochondrial membrane and is responsible for generating ATP through oxidative phosphorylation. It works by transporting electrons from NADH and FADH2 through a series of protein complexes and carriers, establishing a proton gradient across the membrane. As protons flow back through ATP synthase, ATP is generated from ADP and phosphate. Overall, the electron transport chain uses oxygen as the final electron acceptor to oxidize nutrients, produces water, and harnesses the energy to generate three ATP per NADH or FADH2 molecule used.