The key ingredient is chrome which forms a protective oxide film on the surface.
Scrap stainless steel, together with chrome and nickel alloys for added strength and rustproofing, is added to an electrode furnace for melting. Once melted it goes into a refining furnace where pipes blast argon gas and oxygen through it. This converts some impurities to gas and other impurities will float to the surface for removal. More scrap is now added to bulk up the molten mix and this starts a chemical reaction that helps to fuel the refiner.
The molten metal now flows out of the furnace and is guided to cast long moulds which may be further cut into slabs using torches. These slabs are then reheated again to soften them up just enough to be water blasted to remove a rusty scale that has now formed on the surface.
Slabs will go through processes to flatten and cool them to make thin long sheets which are then coiled and taken for an acid wash to remove built up scale since the last cleaning. To soften the steel again for further processing, and to further relieve any stresses in the metal, it is heated and slowly cooled. The steel is now unwound from the coil and taken to a machine roller to make it even thinner. Rolling when cold makes the metal harden, closes the surface pores and gives it a shine. After a final cleaning the chrome combines with oxygen to create an oxide film that prevents rust.