Magnets may need to be coated depending on the application for which they are intended. Coating magnets improves appearance, corrosion resistance, protection from wear and may be appropriate for applications in clean room conditions.
Samarium Cobalt, Alnico materials are corrosion resistant, and do not require to be coated against corrosion. Alnico is easily plated for cosmetic qualities.
NdFeB magnets are particularly susceptible to corrosion and are often protected in this way.
There are a variety of coatings suitable for permanent magnets, Not all types of coating will be suitable for every material or magnet geometry, and the final choice will depend on the application and environment.
An additional option is to house the magnet in an external casing to prevent corrosion and damage.