The biggest challenge with cast iron pans is cleaning them properly so that they don't lose their seasoning and develop rust. Seasoning refers to a layer of oil that has been cooked into the pores of the iron and prevents the cast iron from rusting. Seasoning also prevents food from sticking to the pan.
Here are the steps for cleaning your cast iron pan after you've used it:
First, let the pan cool. Scrape out any big bits of cooked-on food. If stuff is really baked on, boil some water in the pan to loosen it.
Now, using a stiff-bristled brush or scrubber, scrub out the pan with a mild soap and hot water. A lot of people will tell you not to use soap, because they're afraid the soap will dissolve your seasoning. The trouble is, there's a difference between seasoning and grease. You don't want to leave a layer of grease on the pan, as it will eventually turn rancid and make your food taste bad. So do use a mild soap; you'll be glad you did.
Rinse the pan thoroughly, dry it with a clean kitchen cloth (the cooking surface and the underside) and set it on the stovetop. Heat it up for just a minute and pour a small amount of cooking oil onto the pan. A drop the size of a quarter is plenty. Now use a kitchen cloth to rub that oil all over the surface of the pan. Get it into the corners and up the sides, too. I don't recommend using a paper towel for this because you may leave a lot of tiny paper fibers all over the skillet.
So that's it. Wash, dry, and oil. Follow these simple steps and your cast iron cookware will give you years of use.
Also see: Cooking with Cast Iron Cookware