A fuel cell is a device that converts chemical potential energy (energy stored in molecular bonds) into electrical energy. The reactants are hydrogen and oxygen, to produce water, electricity and heat. This is a big improvement over internal combustion engines, coal burning power plants, and nuclear power plants, all of which produce harmful by-products.
Since oxygen is readily available in the atmosphere, we only need to supply the fuel cell with hydrogen, which can come from an electrolysis process.