The answer is electrolysis. This is the chemical reaction that decomposes a substance (usually while in its liquid state) to its components by passing an electric current through it. Electrolysis of water is used to produce hydrogen fuel and also produce oxygen that can be used to supplement breathable air such as in submarines.