Electrolysis is the process whereby
nonspontaneous oxidation-
reduction reactions occur. For example,
electricity can be used to
decompose sodium chloride into its
component elements.
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.