Electrolysis of water is breaking down of water into hydrogen and oxygen by passing electricity through it.
Distilled water is a poor conductor of electricity, so water is made conducting by adding a small amount of electrolyte.
The following chemical reaction takes place when we pass electricity through water during electrolysis:
2H2O →2H2 + O2
Hydrogen gas is liberated at cathode and oxygen gas is liberated at anode.