Electrolysis of water is the decomposition of water (H2O) into oxygen (O2) and hydrogen gas (H2)
due to an electric current being passed through the water.
How does it work?
An electrical power source is connected to two electrodes, or
two plates (typically made from some inert metal such as
platinum, stainless steel or iridium) which are placed in the
water. Hydrogen will appear at the cathode (the negatively
charged electrode, where electrons enter the water), and
oxygen will appear at the anode (the positively charged
electrode)