Corrosion is a natural process that seeks to reduce the binding energy in metals. The end result of corrosion involves a metal atom M being oxidized, whereby it loses one or more electrons and leaves the bulk metal,
M Mm+ + m e-
The lost electrons are conducted through the bulk metal to another site where they reduce (i.e. combine with) a non-metallic element N or another metallic ion G+ that is in contact with the bulk metal,
N + n e- Nn-
Gm+ + m e- G
In corrosion parlance, the site where metal atoms lose electrons is called the anode, and the site where electrons are transfered to the reducing species is called the cathode. These sites can be located close to each other on the metal's surface, or far apart depending on the circumstances.
Corrosion is essentially an electric circuit, since there is a flow of current between the cathode and anode sites. In order for a current to flow, Kirchoff's circuit laws require that a circuit be closed and that there exists a driving potential (or voltage).
Part of the corrosion circuit is the base metal itself; the rest of the circuit exists in an external conductive solution (i.e. an electrolyte) that must be in contact with the metal. This electrolyte serves to take away the oxidized metal ions from the anode and provide reduction species (either nonmetalic atoms or metallic ions) to the cathode. Both the cathode and anode sites must be immersed in the same electrolyte for the corrosion circuit to be complete. The most common electrolyte associated with corrosion is ordinary water.
What provides the potential that drives the corrosion circuit? In most cases, the differences in the atom binding energies within a metal provide the driving potential (e.g. composition cells, stress cells). Ion concentration gradients in the electrolyte can also provide a potential (concentration cells).
Note that inside the metal, the charge carriers are electrons; outside the metal, the charge carriers are ions dissolved in the electrolyte.