This kind of vehicles has three main components: the fuel cell, the electric engine and the hydrogen storage system. In the fuel cell the hydrogen is oxidized. This reaction produces water vapor and electricity. The electricity power an on-board electric motor. The hydrogen can be stored in the car as gas at high pressure (around 300 bar) or liquefied (-253°C at atmospheric pressure).
The main advantage of the use of hydrogen as fuel is that it does not pollute because its only exhaust gas is water. On the other hand hydrogen needs to be produced and compressed or liquefied. For example, producing 1 kg of H2 (which supplies 33 kWh) requires around 55 kWh of energy.