Fuel cells are a type of energy conversion technology which take the chemical energy contained within a fuel and transform it into electricity along with certain by-products (depending on the fuel used).  It's important to note that fuel cells are not heat engines, so they can have incredibly high efficiencies. However, when a heat engine is used to power a fuel cell, the heat engine still has a limiting thermal efficiency.
Fuel cells can be seen as an energy storage device, as energy can be input to create hydrogen and oxygen, which can remain in the cell until its use is needed at a later time. In this sense they work much like a battery.
To produce electricity, a gaseous fuel is input and reacts with a catalyst made of platinum nanoparticles. When molecular hydrogen comes into contact with this, it splits into two H+ ions and two electrons. The electrons are conducted through an electromotive force and electricity is produced. The hydrogen ions pass through a proton exchange membrane where it reaches the cathode and combines with oxygen to form water. This process can continue as long as there is hydrogen and oxygen supplied to the cell.
Click here to see an animation of a hydrogen fuel cell.
An attractive fuel for use in fuel cells is hydrogen, which is actively being researched and developed. The reasons for hydrogen use is not only because of its high energy density (121 MJ/kg), but because the only by-product aside from electricity is water.
Although hydrogen is the most abundant element in the universe, it doesn't exist in its elemental form on Earth. Therefore hydrogen must be manufactured by inputting energy into hydrogen compounds like hydrocarbons or water. Depending on how this is done, the process may also release pollutants. Around 96% of hydrogen produced is done by using natural gas and other fossil fuels, resulting in considerable CO2 emissions. However, for the future, cleaner methods of attaining hydrogen (ie. water) are preferred.
An alternative way to produce hydrogen comes from nuclear power. During off-peak periods (when the electrical grid does not require as much electricity) nuclear power plants may use their electricity for the production of hydrogen. The heat generated by the nuclear reactor could also be used for the production of hydrogen. Combined cycle plants producing both hydrogen and electricity may reach an efficiency of 60%. Many Generation IV nuclear reactors are being designed with the purpose of hydrogen production.
Many countries are spending enormous amounts of money into the development of hydrogen fuel cells, with the main reason being the future problems associated with an oil-dependent society. Oil production is diminishing and it's expected to continue this way—causing an increase in price for it and a greater need for imports of oil in places that do not have many oil resources. The burning of oil and other fossil fuels also produces pollution, which contributes to global warming and ultimately changing climate. These reasons combined demonstrate a strong case for alternatives, with fuel cells being one of them.
Uses of fuel cells range from large electricity generating plants to small devices like cell phones or laptops.
The most promising use for hydrogen as fuel (for the immediate future at least) are in vehicles—and there are already hydrogen based vehicles on the road today. The theoretical maximum efficiency of hydrogen fuel cells is 83%, however, since theory is never accomplished in reality, a realistic efficiency is around 60%. Combined with an electric motor of 90% efficiency, the vehicles can achieve an efficiency of 54% before factoring in other energy losses. This is around 2 - 2.5 times higher than a typical gasoline-powered vehicle.
There is plenty of criticism for these types of vehicles, as many claim the cost of these vehicles will never be practical. The cost of these cells is high as a result of the use of platinum and other valuable components—but the price would have to be less than half of what it currently is to be competitive. The durability and performance of such systems, along with the infrastructure necessary to accommodate them, is also under scrutiny.