Electrolysis is the process whereby nonspontaneous oxidation
s occur. For example, electricity
can be used to decompose sodium chloride
into its component element
Electrolysis occurs in electrolytic cells, which consist of two electrodes in a molten salt or solution. The cell is driven by a battery or some other source of direct electical current. The battery acts as an electron pump, pushing electrons into one electrode and pulling them from the other.
This allows chemists to reverse the process found in galvanic or voltaic cells to produce desirable chemicals, electroplate metals and recharge a battery.