Cast-iron and carbon steel pans are the workhorses of the kitchen, and if you take care of them, they can last a lifetime or more. The key is in seasoning, or "curing" as it's sometimes called, a process that treats the pan with a stick-resistant coating. Although most sources tell you to just use vegetable oil when seasoning, another way is to start with cooking potato peels in the pan.
Clean the pan before you even put potato peels in it, but if possible, avoid soap altogether. Like dishwashers and metal scouring pads, detergents can remove any seasoning still in the pan. For stuck-on food stains, warm the pan, spread kosher salt over the problem and scour it with clean paper towel. Rinse it in hot water and then dry immediately. If you have to use soap, use a small amount of mild detergent and then dry and season the pan right away.
Heat the pan over medium heat for a minute or two before adding 1 cup of water and enough potato peels to cover the bottom. Use a potato high in starch -- russet, for example -- to remove the most grime from the pan. Boil the peels for about 15 minutes and remove the pan from the heat and the peels from the pan. Rinse out any bits of remaining potatoes with hot water.
Hot oil brings out that shiny, rust-resistant surface you're looking for once the starch is in the pan. Use clean paper towel to wipe a thin layer of vegetable oil over the entire pan and then place it in an oven preheated to 300 degrees Fahrenheit. Remove the pan after 45 minutes and allow it to cool to room temperature before using.
If you want your pan to last a lifetime, you have to clean it and coat it in oil regularly. "Regularly" does vary from pan to pan, but you should wash and thoroughly dry it no more than an hour after each use. Avoid strong detergents, dishwashers and metal scouring pads. Whenever you notice the sheen wearing off in spots, re-apply vegetable oil to a hot pan and heat it in the oven again.