Hydrogen is a highly reactive fuel. Hydrogen molecules violently react with oxygen when the existing molecular bonds break and new bonds are formed between oxygen and hydrogen atoms. As the products of the reaction are at a lower energy level than the reactants, the result is an explosive release of energy and the production of water. But hydrogen does not react with oxygen at room temperature, a source of energy is needed to ignite the mixture.
TL;DR (Too Long; Didn't Read)
Hydrogen and oxygen will combine to make water -- and give off plenty of heat in the process.
Hydrogen and Oxygen Mix
Hydrogen and oxygen gases mix at room temperature with no chemical reaction. This is because the speed of the molecules does not provide enough kinetic energy to activate the reaction during collisions between the reactants. A mixture of gases is formed, with the potential to violently react if sufficient energy were introduced to the mixture.
Introduction of a spark to the mixture results in raised temperatures amongst some of the hydrogen and oxygen molecules. Molecules at higher temperatures travel faster and collide with more energy. If collision energies reach a minimum activation energy sufficient to "break" the bonds between the reactants, then a reaction between hydrogen and oxygen follows. Because hydrogen has a low activation energy only a small spark is needed to trigger a reaction with oxygen.
Like all fuels, the reactants, in this case hydrogen and oxygen, are at a higher energy level than the products of the reaction. This results in the net release of energy from the reaction, and this is known as an exothermic reaction. After one set of hydrogen and oxygen molecules have reacted, the energy released triggers molecules in the surrounding mixture to react, releasing more energy. The result is an explosive, rapid reaction that releases energy quickly in the form of heat, light and sound.
On a submolecular level, the reason for the difference in energy levels between the reactants and products, lies with electronic configurations. Hydrogen atoms have one electron each. They combine into molecules of two so that they can share two electrons (one each). This is because the inner-most electron shell is at a lower energy state (and therefore more stable) when occupied by two electrons. Oxygen atoms have eight electrons each. They combine together in molecules of two by sharing four electrons so that their outer-most electron shells are fully occupied by eight electrons each. However, a far more stable alignment of electrons arises when two hydrogen atoms share an electron with one oxygen atom. Only a small amount of energy is needed to "bump" the electrons of the reactants "out" of their orbits so that they can realign in the more energetically stable alignment, forming a new molecule, H2O.
Following the electronic realignment between hydrogen and oxygen to create a new molecule, the product of the reaction is water and heat. The heat can be harnessed to do work, such as driving turbines by heating water. The products are produced quickly due to the exothermic, chain-reaction nature of this chemical reaction. Like all chemical reactions, the reaction is not easily reversible.