Stainless steel fasteners do not stain, corrode, or rust as easily as ordinary steel fasteners. There are different grades and surface finishes of stainless steel to suit the environment to which the material will be subjected in its lifetime.
Stainless steel fasteners differs from carbon steel by the amount of chromium present. Carbon steel rusts when exposed to air and moisture. This iron oxide film (the rust) is active and accelerates corrosion by forming more iron oxide. Stainless steel fasteners have sufficient amounts of chromium present so that a passive film of chromium oxide forms which prevents further surface corrosion and blocks corrosion from spreading into the metal's internal structure.