Fundamental Electrochemistry

Electrochemistry is the branch of chemistry that deals with the interchange of chemical and electrical energy. The electrons in a balanced redox reaction show the relationship between electricity and a redox reaction.

A redox reaction which occurs in a galvanic cell is a spontaneous reaction. These galvanic cell reactions produce energy which can be directed to do work. This energy can be captured by placing the two half reactions of the redox reaction in separate containers called half-cells. The half-cells are connected usually by a wire which allows a flow of electrons. The flow of electrons spontaneously flows through the outer circuitry in which their energy is extirpated.
The oxidation half reaction occurs at the anode and the reduction half reaction occurs at the cathode. The electron flow is always from the anode to the cathode.

Energy input in the form of voltage energy is needed to drive non-spontaneous reaction in an electrolytic cell. Electron flow in this case flows from anode to cathode only because the extra voltage is driving the reaction. There are many applications for the electrolytic cell and the general setup is very similar to galvanic cells.