Galvanic (or dissimilar metal) corrosion occurs as a result of two metals of differing galvanic potential in close proximity to one another in an electrolyte, such as water, saline solutions or acids. The component that is more anodic will corrode faster than it would if not in a galvanic couple.
While best practice would be designs that prevent galvanic corrosion, it is not always possible. Sometimes, the best option is to coat the less noble component with a coating that is closer on the galvanic series to the more noble part.