Cleaning cast iron can be tricky and very complicated, especially heavily rusted cast iron. Cast iron that is heavily rusted needs a lot more attention and more resources needed to pull the rust off the cast iron.
One of the most common suggestions is the use of a vinegar bath. A solution made up of half water and half vinegar. Sadly, a vinegar bath will not help cast iron in this kind of condition. The pitting from the rust is extremely hard to remove.
The two best methods I use to restore rust damaged cast iron is Evapo-Rust or electrolysis tank.
Evapo-Rust is very safe to use. You can purchase Evap-Rust at O'Riley's or through Amazon. Your cast iron skillet needs to be place in a warm area. Evapo-Rust also works better in warm conditions. After allowing your pan to sit for 24-48 hours, you need to pour the contents in a bowl and scrub the pan down using steel wool. The pan should be down to factory grade metal, dull gray. If you are needing the skillet to soak a little bit more longer, you can pour the Evaporust back into the skillet.
The other option is using an electrolysis tank (e-tank). I love using my e-tanks because this is the cheaper route in the long run. However, you only really need an e-tank if you plan on making this your hobby. An e-tank will clean a cast iron skillet within hours by using electrical current to move rust to sacrificial pieces of metal through water. The current comes through a manual battery charger. You can find information about building your own electrolysis tank through Electrolysis Tank Builders on Facebook.
Using Evaporust or an electrolysis tank is a much safer option than using a vinegar based solution. In these two very easy steps, your pan will come out a lot safer and the end product is stunning.
Here's a quick recipe I use to season my cast iron skillet.