Electrochemistry is the study of chemical reactions that are mediated by electron transfer to or from a molecule at an electrode of an electrical circuit. The transfer of electrons to or from a molecule can change atoms’ “oxidation state”.
There is a broad class of chemical reactions where atoms oxidation states change, called oxidation-reduction reactions or “redox” reactions. Oxidation state is a measure of the number of electrons associated with a particular atom in a molecule and the more positive, or “oxidized” an atom is, the higher its oxidation state, and the fewer electrons are associated (because electrons have negative charge).
In a redox reaction, one or more atoms are being oxidized and one or more other atoms are being reduced (the opposite of oxidation). This is necessarily so, because the electrons transferred from the oxidized atom(s), must be transferred to some other atom which is therefore reduced.
In electrochemistry, the oxidation aspect of a redox reaction and the reduction aspect occur at opposite electrodes (positive and negative). The electrons that are transferred from atom to atom pass through an electrical circuit. In situations where the redox is spontaneous - where the energy (Gibbs free energy) of the products is lower than the reactants - an electrochemical “cell” can produce an electrical potential, or voltage and the energy released by the redox reaction can be used to do useful work. This is the basis of battery chemistry of various sorts, and fuel cell technologies.
Where the energy of the products is higher than the reactants, the electrical circuit must be forced to have electrical current and the chemical reactions that result are generically called an electro-chemical synthesis. In the case where a battery is involved this process is called “recharging”. In the case of water being split into hydrogen and oxygen this process is called “electrolysis”. In the case where a metal is being deposited on an electrode from solution (where it is reduced from a positive ion), it is called “electroplating”.
The relationship between the free energy change of a reaction and the electrochemical voltage of that reaction, is described by the Nernst equation.