Food sticks easily to a bare metal cooking surface; it must either be oiled or seasoned before use. The coating known as seasoning is formed by a process of repeatedly layering extremely thin coats of oil on the cookware and oxidizing each layer with medium-high heat for a time. This process is known as "seasoning"; the color of the coating is commonly known as its "patina" - the base coat will darken with use.
To season cookware (e.g., to season a new pan, or to replace damaged seasoning on an old pan), the following is a typical process:
First the cookware is thoroughly cleaned to remove old seasoning, manufacturing residues or a possible manufacturer-applied anti corrosion coating and to expose the bare metal. If it is not pre-seasoned, a new cast-iron skillet or dutch oven typically comes from the manufacturer with a protective coating of wax or shellac; otherwise it would rust. This needs to be removed before the cookware is used. An initial scouring with hot soapy water will usually remove the protective coating. Alternatively, for woks, it is common to burn off the coating over high heat (outside or under a vent hood) to expose the bare metal surface. For already-used cookware 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.
Then several times the following is performed:
# Applying a very thin layer of animal fat or cooking oil (ranging from vegetable oil to lard, including many common food-grade oils).
# Polishing most of it off so that barely any remains or alternatively use a seasoning paste
# Heat the cookware to just below or just above the smoke point to generate a layer of seasoning.
The precise details of the seasoning process differ from one source to another, and there is much disagreement regarding the correct oil to use.  There is also no clear consensus about the best temperature and duration. Lodge Manufacturing uses a proprietary soybean blend in their base coats as stated on their website, but states that all oils and fats can be used. The temperature recommended for seasoning varies from high temperatures above  to temperatures below .
Seasoning a cast-iron or carbon steel wok is a common process in Asia and Asian-American culture.  While the vegetable oil method of seasoning is also used in Asia, a traditional process for seasoning also includes the use of Chinese chives or scallions as part of the process.