Cathodic Protection is an electrochemical means of corrosion control in which the oxidation reaction in a galvanic cell is concentrated at the anode and suppresses corrosion of the cathode in the same cell. The steel pipeline is cathodically protected by its connection to a sacrificial magnesium anode buried in the same soil electrolyte.
Cathodic protection was first developed by Sir Humphrey Davy in 1824 as a means of controlling corrosion on British naval ships.
Cathodic protection prevents corrosion by converting all of the anodic (active) sites on the metal surface to cathodic (passive) sites by supplying electrical current (or free electrons) from an alternate source. Usually this takes the form of galvanic anodes, which are more active than steel.