How does seasoning a cast iron pan actually work?
Through polymerisation — thin layers of oil are heated until they chemically bond into a hard, plastic-like coating on the metal. It is not oil sitting on the surface; it is a new substance formed there.
The chemistry. Heating a very thin film of oil past its smoke point drives off volatile compounds and causes the remaining fatty acid molecules to cross-link with each other and bond to the iron, forming a tough, slick, water-resistant polymer. Repeated thin layers build a durable surface. Oils with more unsaturated bonds polymerise more readily, which is why flaxseed, grapeseed and sunflower are often recommended, though ordinary vegetable oil works perfectly well.
Why thin layers are the entire technique. Too much oil cannot fully polymerise; it partly bakes into a sticky, uneven varnish that flakes. Wipe the pan until it looks almost dry before heating — the commonest mistake is leaving a visible film.
The method: clean thoroughly, apply a very thin coat of oil inside and out, wipe off the excess, heat above the oil's smoke point for an hour or so with ventilation, then cool. Repeat for several layers. Ordinary cooking, especially frying, continues to build it.
What damages seasoning: prolonged soaking, which lets iron rust beneath; strong detergents and scouring, which strip layers — though a little washing-up liquid does not destroy seasoning, contrary to folklore, since polymerised oil is not soluble; acidic foods simmered for long periods, which attack the layer; and sudden temperature shocks.
Rust is not fatal. Scrub it off, re-season, and the pan is fine — which is the real advantage of cast iron over coated non-stick, which cannot be repaired at all.
Carbon steel behaves identically and is lighter; enamelled cast iron does not need seasoning and is not non-stick.
Storage: dry thoroughly on the hob after washing, and store without a sealed lid so moisture cannot sit inside.