FACTORY NEW: Cast iron pans fresh from the factory usually are treated with a coating to prevent them from rusting before they sell. This coating is not good to eat and it may contain plastic or wax, so it's a good idea to go over your pan with steel wool before seasoning the pan or using it for the first time. After scouring it with steel wool, wash your skillet or pan in hot soapy water and then place over heat until dry. After you have cleaned and dried your new pan, condition it before using.
RUST: If your pan or skillet is presently rusty, clean off the rust with steel wool first. You can recondition virtually any cast iron skillet or pot, no matter how yucky it is when you find it. After you have scoured off the rust, wash it and dry it over heat. Then condition your pan.
Reconditioned Tool
TO CONDITION: If it is new, recently cleaned with steel wool, or otherwise not greasy, you need to "season" or "condition" it first before cooking. To do this, put it on a hot burner, add a couple of tablespoons of cooking oil. Allow to get hot, then to cool, then wipe the oil all over, then wipe off any excess oil.
TO CLEAN: There are different methods, but perhaps the best method is the one that never uses soap. Soap will strip the skillet of the oil, and it is supposed to have oil on it! Unlike other pans, a good cast iron piece will be black with residual oil. This prevents the pan from rusting and the metal from reacting with the food, and the oil also makes it work like a non-stick pan. So instead of soap, use salt to clean the pan. Coarse kosher salt is good for this purpose because it is the right coarseness and you can get a large box cheaply.
When you're done cooking, rinse out your pan, dump in a tablespoon or two of salt and scrub the pan just with salt and water combined in a thick, grainy paste. Rinse, then put the pan on the burner again and heat to dry the pan before putting it away (so it doesn't rust). The pan still has oil on it but it's clean, so next time you cook you can just begin cooking without having to condition the pan again.