In brief, corrosion is a chemical reaction occurring by an electrochemical mechanism (a redox reaction). During corrosion of iron or steel there are two reactions, oxidation (equation ), where electrons leave the metal (and the metal dissolves, i.e. actual loss of metal results) and reduction, where the electrons are used to convert oxygen and water to hydroxide ions (equation ):
In most environments, the hydroxide ions and ferrous ions combine to form ferrous hydroxide, which eventually becomes the familiar brown rust:
As corrosion takes place, oxidation and reduction reactions occur and electrochemical cells are formed on the surface of the metal so that some areas will become anodic (oxidation) and some cathodic (reduction). Electrons flow from the anodic areas into the electrolyte as the metal corrodes. Conversely, as electrons flow from the electrolyte to the cathodic areas, the rate of corrosion is reduced. (The flow of electrons is in the opposite direction of the flow of electric current.)
As the metal continues to corrode, the local potentials on the surface of the metal will change and the anodic and cathodic areas will change and move. As a result, in ferrous metals, a general covering of rust is formed over the whole surface, which will eventually consume all the metal. This is rather a simplified view of the corrosion process, because it can occur in several different forms.
Prevention of corrosion by cathodic protection (CP) works by introducing another metal (the galvanic anode) with a much more anodic surface, so that all the current will flow from the introduced anode and the metal to be protected becomes cathodic in comparison to the anode. This effectively stops the oxidation reactions on the metal surface by transferring them to the galvanic anode, which will be sacrificed in favour of the structure under protection. More simply put, this takes advantage of the relatively low stability of magnesium, aluminum or zinc metals; they dissolve instead of iron because their bonding is weaker compared to iron, which is bonded strongly via its partially filled d-orbitals.
For this protection to work there must be an electron pathway between the anode and the metal to be protected (e.g., a wire or direct contact) and an ion pathway between both the oxidizing agent (e.g., oxygen and water or moist soil) and the anode, and the oxidizing agent and the metal to be protected, thus forming a closed circuit; therefore simply bolting a piece of active metal such as zinc to a less active metal, such as mild steel, in air (a poor ionic conductor) will not furnish any protection.