The structure of fuel cells is fairly simple. A fuel cell consists of two electrodes (anode and cathode) sandwiched around an electrolyte. The anode and the cathode serve as a catalyst. Different materials are used in fuel cells as electrolytes. Electrolytes might be liquid or solid with a membrane like structure.
Each cell generates a small voltage. Cells are assembled into stacks to increase the voltage.
In the fuel cell oxygen or air passes over the cathode and hydrogen over the anode, generating electricity, water and heat. Encouraged by a catalyst, the hydrogen atom splits into a proton and an electron, which take different paths to the cathode. The proton passes through the electrolyte. The electrons create a separate current that can be utilized before they return to the cathode, to be reunited with the hydrogen and oxygen in a molecule of water.
A fuel cell system which includes a "fuel reformer" can utilize the hydrogen from any hydrocarbon fuel - from natural gas to methanol, and even gasoline. Since the fuel cell relies on chemistry and not combustion, emissions from this type of a system would still be much smaller than emissions from the cleanest fuel combustion processes.