Hydrogen is the most common element in the universe so we'll never run out of it! It's the simplest element in chemistry - just one proton and one electron.
When you burn something, you basically add oxygen and the process releases energy that can be used. For example, you burn methane (CH4) by adding two lots of oxygen (2O2), and you end up with carbon dioxide (CO2) plus two lots of water (2H2O), plus heat. It works backwards too - you could start with water and CO2, and rearrange them to recreate methane. But you would need to ADD energy - in fact the same amount of energy that would have been released by burning methane. You never get something for nothing in science.
Water is basically burned hydrogen, which exists as a diatomic gas (H2). You use two lots of hydrogen (2H2), add oxygen (O2) and you get lots of heat and two lots of water (2H2O) as a by-product. Burning hydrogen releases more energy per mass than any other chemical reaction - that's why the space shuttle's main engines use hydrogen as a fuel. The trouble is that it is very hard to store - you can't just put hydrogen in a tank, like petrol.
You can compress it into a cylinder, like you do with acetylene or natural gas, but remember hydrogen is small and light. It leaks out very quickly, no matter how well you make the seals (the hydrogen molecules slip through the seals, and even through the metal tank walls). Or, you could liquify it in a cylinder like you do with LPG or propane, but hydrogen has a very low boiling point, even under high pressure. It won't stay liquid unless you use expensive refrigeration to keep the tank at, say, minus 200 degrees or more. You have to use 'cryogenic' tank storage - too big, heavy and complicated for cars.
The third alternative is the one used in hydrogen test cars, which stores hydrogen as a chemical mixture with other elements, usually a metal hydride. The hydrogen is released when you add another chemical - a catalyst - to release the hydrogen. But this method is not very volume efficient - you don't get to store as much hydrogen per tank volume as you would with leaky or supercold cylinders. It's the hydrogen storage that is the problem.
Hydrogen can be burned in a normal (modified) piston engine, or more efficiently in a 'fuel cell' which creates electricity directly from the hydrogen burning process. The Apollo command module used hydrogen fuel cells to create electricity, and water as a byproduct for the astronauts. Volkswagen is working on more modern 'high temperature' fuel cells for auto use.
http://www.fuelcellsworks.com/Supppage6337.html
Hydrogen is easily created simply by splitting water back into hydrogen and oxygen. But of course you need to ADD energy to do so - the same energy you would have got from burning hydrogen in the first place. But you could adapt wind or solar power to split water on a large scale.