Fuel cells generate electricity and heat through an electro-chemical reaction between a fuel and oxygen. In automotive applications they typically use hydrogen as the fuel and oxygen from the ambient air, so the only by-product is water.
The electricity produced can be used to charge a battery, or to directly drive electric motors for propulsion, while the waste heat can be captured for thermal systems or additional electricity generation via thermocouples.
It's not the first time that Audi or the Volkswagen Group has trialled fuel cells. In 2009, Audi tested the Q5 HFC, which used two high-pressure cylinders of hydrogen to supply a fuel cell powering the Q5 HFC's twin electric motors.