they use electrolysis to decompose the water into hydrogen and oxygen , H2 and O2....then these are burnt to make water again ,releasing the energy as heat....
problem is that it only releases the energy you already put in to decompose water into H2 and O2 in the form of electricity minus the inefficiencies of your fuel cell.
This means that a simple electric motor running on batteries will be more efficient , cheaper and lighter and also more reliable and would require lesser maintainance...
In short its useless for making fuel ( scam ). However, it can be used to manufacture pure water but then again, there's a thing called distillation that does it cheaper, and reverse osmosis that does it even cheaper...
Moreover a far cheaper way of manufacturing Hydrogen gas is cracking of oil.....and thats what is used in advanced green countries to make hydrogen i think...