Let me start by saying, you do NOT have to do this with new castiron ! I was doing a clean out of a rental for a landlord friend and found 2 castiron pans, a comal or flat pan and a small frying pan, they weren't totally crusted like some you find by they were definately grungy. Here's how I cleaned them.
NOTE: Yes I could have cleaned them by throwing them in a fire but it was 100 plus degrees f today
Step 1: What I Used
salt and enough water to make a paste
Step 2: Clean It
scrape out as much stuck on gunk as possible and then pour enough salt to cover the bottom of your pan, (it depends on the size of your pan) add enough water to make a paste and then crank up the heat, I let mine sit for about 20 minutes on an electric burner set to high
Step 3: Clean 2
after the pan has cooled enough that you can lift it, use a stiff metal utensil to scrap the caked on salt loose (you can see I'm using a spoon) you probably won't get it all off, just don't leave any chunks stuck (it's stuck to the stuff you want to remove!) Now run the pan under hot running water to remove any remaining salt. Put the pan back on your heat source to dry and start the seasoning process
Step 4: Its Clean !
Now that your pan is clean you can start the seasoning process by heating it up and adding a high smoke point oil