Fuel cells are devices which take stored chemical energy and converts it to electrical energy directly. Essentially it takes the chemical energy that is stored within whatever energy source you have such as hydrogen, gasoline or methane and then through two electrochemical reactions it converts it directly to electricity.
Since the conversion of the fuel to energy takes place via an electrochemical process and not combustion, the process is non polluting and efficient. In fact, up to three times more efficient than fuel burning.