A fuel cell is essentially a battery that does not need recharging.
As long as hydrogen and oxygen fuel are supplied, it can continue to
supply heat and an electrical current indefinitely. A fuel cell consists
of an electrolyte (a conductor of charged particles) between an anode
(negatively charged electrode) and a cathode (a positively charged electrode).
Once activated by a catalyst, the hydrogen gas separates into protons
and electrons, and the electrons are conducted through a wire, forming
an electrical current. The protons move through the electrolyte, where
they combine with oxygen and other electrons to produce heat and a water
byproduct.
A Schematic Fuel Cell
Picture Courtesy of the University of Illinois.