To passivate metal, you must use chemical processes to remove free iron. This creates a protective oxidative layer that is “passive”, meaning it won’t react to corrosive exposure from water or air.
This chemical process selectively removes free iron from a metal’s surface, only leaving behind oxides like chromium and nickel. In a sense, passivation uses corrosion to fight corrosion because it uses oxidation to fight other corrosive exposures.