Wot he said X2 ^^^^
FWIW...
One type of cathodic protection system is the sacrificial anode. The anode is made from a metal alloy with a more "active" voltage (more negative electrochemical potential) than the metal of the structure it is protecting (the cathode). The difference in potential between the two metals means the sacrificial anode material corrodes in preference to the structure.
There must be two other conditions existing besides the anode and the cathode for the sacrificial anode method to work. There must be a return current path for the electrons to flow from the anode to the material it is protecting (being in physical contact is the usual path) and an electrolyte (water, humidity) to convey the electrons.