It transfers the electrons to a series of cytochromes which redistribute the energy over three ATPs. The metals are surrounded by porphyrin rings made of nitrogen and carbon compounds which exchange electrons with the metals. The rings are held in place by proteins. After the electrons give up a significant amount of their energy, they combine with oxygen and hydrogen to form water. However, abbreviated forms of it occur in bacteria which do not have mitochondria.
Mitochondria are somewhat like cells within cells.
They are surrounded by a double layered membrane. The osmotic pressure moves the hydrogen from one point to another, so it can relocate from NADH to oxygen. The hydrogen moves back into the mitochondria by passing through a protein complex which it sets in motion creating a turning wheel. Also within the mitochondria is breakdown metabolism which yields most of the energy. It breaks down two-carbon compounds which usually originate with glucose.