A site titled Corrsion doctors says:
The first application of Cathodic Protection dates back to 1824, long before its theoretical foundation was established. Cathodic protection has probably become the most widely used method for preventing the corrosion deterioration of metallic structures in contact with any forms of electrolytically conducting environments, i.e. environments containing enough ions to conduct electricity such as soils, seawater and basically all natural waters. Cathodic protection basically reduces the corrosion rate of a metallic structure by reducing its corrosion potential, bringing the metal closer to an immune state. The two main methods of achieving this goal are by either:
Using sacrificial anodes with a corrosion potential lower than the metal to be protected (see the seawater galvanic series)
Using an impressed current provided by an external current source