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 is used where both the properties of steel and resistance to corrosion are required.
Carbon steel rusts when exposed to air and moisture. Stainless steel differs from carbon steel by the amount of chromium present. Stainless steels contain sufficient chromium to form a passive film of chromium oxide, which prevents further surface corrosion and blocks corrosion from spreading into the metal's internal structure. This iron oxide film (the rust) is active and accelerates corrosion by forming more iron oxide.