While the future of automobile fuel will most likely be the hydrogen fuel cell but that leave the millions of automobiles that are already in use just scrap metal. A very promising and still emerging hypothesis is an electrolysis on demand system. While it would not be nearly as efficient as the fuel cell, it could still be enough to use until a full transition to fuel cell technology.
The technology in electrolysis is mostly chemistry. Water broken down to the molecular level consists of hydrogen and oxygen. Hydrogen happens to be a highly flammable gas and oxygen happens to be what we breathe and also needed for fire. There is an abundance of water, actually the surface of the Earth is 60% water which means that it probably will never run out. And if that’s not enough, when you burn hydrogen, the byproduct is water. So the byproduct is more fuel, a win-win.
In electrolysis of water, water is broken down to the molecular level and the gas is used for fuel. This process is most simply done by placing a direct current electrical circuit in water. Because of the polarity of the electric current, the molecules are attracted to and pulled to the similarly charged electrode. Hydrogen is in group one of the periodic table which means it has only one electron where it should have two to be stable. Oxygen has six electrons where it should have eight, this is why there are two hydrogen atoms bonded to one oxygen, they compete their electron clouds.