There are a few methods to remove rust from a cast iron skillet. When choosing a method, consider how much rust needs to be removed.
Use a nonmetallic scrub pad, such as a green pad or steel wool, to scrub the rust off the cast iron skillet. Rinse with warm water and a mild detergent, and dry the pan immediately to prevent rust from redeveloping. 
Sprinkle coarse sea salt in the skillet. Slice a potato in half, and use the cut side of the potato to scrub the skillet with the salt, using a circular motion. If the salt becomes too dirty, discard it, add fresh salt, and continue scrubbing. Once the rust is gone, rinse with water, pat dry and place on a lit burner for a minute to dry the skillet completely. 
If your skillet is extremely rusty, soak the skillet in a solution of equal parts white vinegar and water just until the rust flakes off easily. While you can soak the skillet for up to eight hours, it is best to check the progress periodically and remove the skillet from the vinegar solution once the rust is loosened. This prevents the vinegar from eating away the skillet's cast iron surface, which it will do once the rust is removed. Rinse the skillet, then use one of the above methods to scrub it. 
Once you remove the rust from the skillet, you must season it. To do this, coat the interior and exterior of the pan, including the handle, with unsalted vegetable oil. Place it face-down on a foil-covered cookie sheet, and put it in a 350-degree Fahrenheit oven for an hour. Allow it to cool, then remove excess oil with a paper towel.