Seasoning is a process used to protect bare cast iron and carbon steel cookware from rusting, provide a non-stick surface for cooking, and prevent food from interacting with the iron of the pan. This is a process similar to bluing (steel), forming an oxidizing chemical reaction with iron on the surface selectively forming magnetite (Fe3O4), the black oxide of iron (as opposed to rust, the red oxide of iron (Fe2O3)). Black oxide provides minimal protection against corrosion, unless also treated with a water-displacing oil to reduce wetting and galvanic action.
Seasoning is a three-step process, involving cleaning the cookware to expose the bare metal, applying a layer of animal fat or vegetable oil, and heating the cookware to bond the fat to the metal. Seasoning also occurs as a natural by-product of using the cookware to cook foods that deposit oils or fats on the pan.
New cast iron that is not pre-seasoned is often sold with a protective coating (wax or shellac). This coating must be removed (typically by scouring) to expose the bare cast iron surface before the pan is seasoned. For already-used pans that are to be re-seasoned, the cleaning process can be more complex, involving rust removal and deep cleaning (with strong soap or lye, or by burning in a campfire or self-cleaning oven) to remove existing seasoning and build-up.
Fats and oils typically used for seasoning include lard, hydrogenated cooking oils such as Crisco, and palm or coconut oil (in general, oils that are high in saturated fats, and therefore less likely to become rancid).
Heating the cookware (such as in a hot oven or on a stovetop) facilitates the oxidation of the iron, the fats and/or oils protect the metal from contact with the air during the reaction, which would cause rust to form. Some cast iron users advocate heating the pan slightly before applying the fat or oil to ensure that the pan is completely dry and to open "the pores" of the pan.
Newly seasoned cast iron will have a dark brown coating. If the seasoning process is repeated, or after prolonged use, this coating will turn glossy and black, and the non-stick properties of the pan will further improve.