Electrolysis is the process of using electricity to split water into hydrogen and oxygen.
Electrolysis converts electrical energy into chemical energy by storing electrons in the form of stable chemical bonds.
Those stored chemical energy can be converted to electricity later if required.
An electrolytic cells consists of three major components which include two electrodes and an electrolyte. The electrolyte is most commonly a solution of water or maybe other solvents in which the ions get dissolved. The electrodes are connected by wires.
The following diagram shows the components of an electrochemical cells: