Metal and metal alloys oxidate with the oxygen inside the air and the water chemically. This oxidasing process is called corrosion and causes serious damage on the metal surface.
This corrosion is quite fast in water and especially in salty water. That is why the metal parts of the boats are under the serious risk of the corrosion and if these parts are not protected well, it can end up total dissolution of the parts.
The main body of the metallic ships, metallic parts such as shaft, propeller, and rudder of the non-metallic boats, yachts, and other sea vehicles; petroleum and natural gas pipelines and marine structures like piers are all under the same risk of the corrosion.
Cheaper sacrificial anodes are used to protect these costly metal parts from the corrosion. These anodes are produced by using aluminum, zinc, magnesium and their alloys. All these active metals and their alloys has quite high electrochemical potential to oxidate faster than the costly metal parts.
Anode consume itself to protect the metal costly parts that anode is mounted on from corrosion and this prevented corrosion is called as cathodic protection.
A good cathodic protection against the water is provided by using the most suitable anode for the related water type where the metal parts to be protected are in and changing the consumed anodes just on time.