Corrosion mechanisms in theory and practice