What is the best way to clean a cast iron pan that is heavily soiled?

Use a scrub brush or scrub sponge, but not one with any kind of metal in it. Contrary to popular opinion, you should be able to use soap if your pan is properly seasoned, because proper seasoning results from polymerization of oils across and to the pan itself, rather than just oil sitting on the surface of the pan. If necessary, you can re-season the pan, but this is usually excessive.