The following diagram, produced with the KTS Thermo Excel add-on and modified for the Internet, describes the potential-pH equilibrium diagram for the system iron-water at 25oC considering only the hydrated forms of the possible s. The gray zone describes the region of stability of the base metal (Fe or iron), also called the immunity region according to Pourbaix. The orange zone indicates where one could expect to see rust, a non-protective form of corroded iron.
(click to enlarge)
Thermodynamic principles can help explain a corrosion situation in terms of the stability of chemical species and reactions associated with corrosion processes. However, thermodynamic calculations cannot be use to predict corrosion rates. When two are put in contact, they can produce a voltage as in a battery or electrochemical cell causing galvanic corrosion. The material lower in what has been called the 'galvanic series' will tend to become the anode and corrode while the material higher in the series will tend to support a cathodic reaction. Iron or aluminum, for example, will have a tendency to corrode when connected to graphite or platinum. What the series cannot predict is the rate at which these metals corrode. Electrode kinetic principles have to be used to estimate these rates.
See also: Introduction and references, Iron corrosion products, Iron species and their thermodynamic data, Equilibrium reactions of iron in water, Pourbaix diagram of iron, Rust chemistry