Similar to batteries, fuel cells operate with electrochemical reactions between the anode or cathode and the electrolyte membrane, but with continuous fuel and air supplies.
When hydrogen comes in contact with the catalyst, the hydrogen splits into protons and electrons. The protons pass through the proton exchange membrane unimpeded and proceed to the cathode side, while the electrons are blocked and forced to travel through an external circuit. As they travel along the external circuit, they provide the electricity needed for auxiliary power or to drive a motor. Eventually the hydrogen protons and electrons reunite and combine with oxygen to produce water.