A fuel cell makes electricity using the energy released by mixing fuel with air, a reaction which creates water and sometimes also carbon dioxide. The most common fuel for fuel cells is hydrogen, which when reacted with oxygen from air produces only water. Fuel cells work like a battery being constantly fed with fuel so it never runs out (as long as you have enough fuel). Fuel cells are an important part of the hydrogen economy. Hydrogen molecules are found in substances such as methane, water and biomass but in all cases some energy is required to extract it. There are two common ways to produce hydrogen - it can be separated from most fuels like oil, gas, coal in a process called steam reforming, or it can be extracted from water using a process called electrolysis. If the hydrogen is separated from fossil fuels, carbon dioxide is released. If the energy used to extract it from water via electrolysis comes from solar or wind, then the hydrogen produced is benign because no emissions are released. Hydrogen can also be separated from renewable biogas, which means the carbon emitted is not of fossil origin and therefore is part of the natural carbon cycle.

How to Convert Energy
Water is a molecule that consists of one oxygen atom and two hydrogen atoms.  It takes energy to separate water into oxygen and hydrogen, and energy is released when they are put back together as water.  A fuel cell puts hydrogen and oxygen back together in a way releases the energy in the form of electricity.

Fuel (the energy source, usually hydrogen) and air (which contains the oxygen) are put into opposite sides the fuel cell. In the middle of the fuel cell there is a "screen", called an electrolyte, sandwiched between two metal plates, called electrodes, which keeps the fuel and air separate. Different kinds of fuel cells get their names based on what type of screen is used to separate the fuel and air. The screen only allows specific charged molecules, also known as ions, to pass through them.

In order to create ions, electrons have to be carried from the one side of the system to the other. The electrons are split off from the fuel by the metal plate at the fuel side and need to travel to the air side to complete the reaction. Because the screen doesn't let electrons pass through, they go through a separate wire, to the other metal plate on the air side. The travel of electrons creates electric current (electricity). The wire is where electricity can be used. For example, the wire can be cut in half, and a light bulb can be connected in between the two halves.

In the meantime, the ions pass through the screen and react with the molecules (already on the other side) and electrons (which traveled through the wire, giving off energy to power electronics) on the other side. Water is formed (and, depending on the fuel type, occasionally other products), which them comes out through an exhaust pipe.

Efficiency
Fuel cells make electricity by combining oxygen and hydrogen. Efficiency is very good (about 40%-70%). They have a maximum efficiency of 83% if exhaust heat is used during the reaction. Also, fuel cells can use various fuels, for example, natural gas, methanol, LPG (Liquid Petroleum Gas), naphtha, kerosene etc.

Features
Some types of fuel cells produce only water, which means no pollution. Most types of fuel cell cause much less emissions than classic ("caloric") power generation. They can consume the same fuel types as classic power generators, for example Diesel engines, but they are about two times as efficient, meaning they can produce the same amount of energy with half as much fuel, and thus at least half as much pollution. Additionally, the direct conversion fuel cells use has less risk of producing secondary emissions like NOx, SOx, and particulate matter, which are side effects of combustion, contribute to global warming, and are known as criteria pollutants. 

Fuel cells are very quiet. They have no moving parts aside from some fans to move air, and pumps to move water which means they very rarely require repairs, however some large fuel cells used for powering things like buildings can be quite fragile.

Because of very low pollutant emissions, fuel cells are often used in vehicles that move inside buildings, like forklifts. Because they are very quiet, they are used on some military submarines to avoid detection. Fuel is more efficiently used, which means fuel cells can work longer without getting new fuel. This lets them be used in places that are hard to get to, such as weather or research stations, space ships, or military bases.

Since spaceships are launched using rockets containing pure hydrogen and oxygen, the on-board electricity is produced using very efficient fuel cells which can use these fuels. Additionally, the fuel cells on spaceships produce pure water on their exhaust, which can be further captured and used as drinking water for astronauts, meaning absolutely nothing is wasted.

Types of Fuel Cells
Fuel cells can be classified by the type of inner screen (electrolyte). For instance, phosphoric acid fuel cells are for low temperatures. It is used in cell phones and automobile power supplies that require high currents because it is much safer. Alkali fuel cells usually contain potassium hydroxide (KOH). Methanol fuel cells are used by reacting methanol electrochemically. This type of fuel cell is a better choice for simpler system. But methanol fuel cells have low output densities as its reacting rate is slow.

Some important types of fuel cells are:
 Phosphoric Acid fuel cell (PAFC) - Phosphoric acid fuel cells are commercially available today. They are the most common fuel cells for combined heat and power generation.
 Proton Exchange Membrane fuel cell (PEM) - These fuel cells operate at relatively low temperatures (about 175 °F), have high power density, can vary their output quickly to meet shifts in power demand, and are suited for applications, such as in automobiles, where quick startup is required. All commercial fuel cell vehicles use this type of fuel cell. The drawback of these fuel cells is that they require high-purity hydrogen which is costly to produce.
 Molten Carbonate fuel cell (MCFC) - These fuel cells operate at very high temperatures which allow them to convert more complex fuels, like natural gas, into hydrogen fuel to be used by the cell itself. These take several hours to startup and shutdown, so they are only used in applications where they can keep running continuously, like stationary power for large buildings/businesses.
 Microbial fuel cell (MFC) - A fuel cell that uses respiring microbes to convert organic substrates into electrical energy, using oxidation reduction reactions.

Applications
There are many uses for fuel cells —  major automakers are working to commercialize fuel cell cars.  Toyota and Honda have released the Mirai and Clarity respectively.  Fuel cells are powering buses, boats, trains, planes, scooters, forklifts, and bicycles.  There are fuel cell-powered vending machines, vacuum cleaners and highway road signs.  Miniature fuel cells for cellular phones, laptop computers and portable electronics are predicted.  Hospitals, credit card centers, police stations, and banks use fuel cells to provide power to their facilities.  Wastewater treatment plants and landfills use them to convert the methane gas they produce into electricity.  Fuel Cells have long been used in outer space.  Telecommunications companies use fuel cells at cell phone, radio and 911 towers.

References 

Energy