What are they
Sacrificial anodes are chunks of zinc, aluminum or magnesium which are fitted to a boat underneath the waterline.
Why are they needed
Their job is to help prevent corrosion of expensive metal boat parts (prop shaft, engine) by sacrificing themselves to be corroded away first.
What causes corrosion
When two dissimilar metals are in close proximity underwater a constant stream of electricity passes from metal with a higher value to metal with a lower value (in the Galvanic Series). The result: the more active metal (confusingly the one with the lower value) will corrode first. When an anode is fitted, it becomes the most active so gets eaten away first.
Anodes need replacing when they’re about 1/3 degraded (which in practice usually means annually).