Easy method:
First coat well with oven cleaner and seal into a plastic trash/garbage bag and let it set for at least 24 hours. More is better, judge by the crud.
Clean this all off, use a Chore Boy, steel wool or other non brass tool. Stainless is a good material to use. Don't use a grinder or sand blaster. Wire brush in a drill - well it can remove material too and changes the surface. If you don't care about resale or value of the piece this can be OK.
If you still have some caked on stuff repeat.
This will not remove rust. Once you have all of the crud off then go to a 50/50 vinegar water bath for rust removal. Watch this closely every hour or so. Rinse, check and re-submerge. You can destroy a piece if you aren't diligent.
Other more high production methods is to use a lye bath or electrolysis. Lye bath is relatively easy but doesn't remove rust and you still need to use the vinegar bath for that. Electrolysis is the premier method and removes crud, rust, paint, etc in one step but takes some effort to set up and really doesn't make sense if you are just doing a piece here or there.
After you are done with the vinegar bath, wire brushing for rust removal. Start the seasoning process immediately. You will get flash rusting after you finish the post vinegar bath wash/rinse.
Preheat the oven to 250, coat the item with your high smoke point oil of choice. Do not coat heavily, wipe off well with a paper towel. There only needs to be a light coating. Set in the oven for 30 minutes or so. Then repeat coating the item with oil (wipe off excess) and jack the temperature up to 350. After 30 minutes, remove and wipe again then jack up the temp to 400 or higher and bake for another 30-50 minutes. Repeat the wipe of oil and run again at 400 until you see the color/finish you are looking for. Seasoning builds up over time/use. This is just getting you to a starting point. It's very important to understand you are working with a hot piece of iron and prepare accordingly. You will see some smoking of course and your house will smell.
This re-seasoning process is one that folks will provide all kinds of methods, technique etc. The one I mention is basic and is all I use. It's not the best but won't cause any problems and is good for basic maintenance. You end up developing your own process after a while. It's just intended as a starting point.
You can also have someone do this for you who may have one of these set ups already. If you post on the web site I mentioned you might find a collector/restorer in your area that may clean up a piece for you. Collectors are often doing a run of pieces at a time that they are prepping for resale/collection, etc. Another piece thrown in often doesn't make a difference and they will usually charge a very reasonable per piece fee.
But the closed bag oven cleaner followed by vinegar solution for rust removal works perfectly for a piece or two here and there.
In fact the oven cleaner in a bag is the best method for grill grates either cast iron, steel, stainless, porcelain, etc. I use it for my grates now for a good while.
But - don't sand blast or grind a vintage or quality piece of cast iron no matter how grungy it is. These methods alter the original surface, affect the seasoning/finish end result and the media is very hard to get out of porous cast iron.
If you have a piece that has heavy pitting, cracks, etc then it doesn't matter as it's scrap value anyway. Minor pitting on the bottom is not an issue for a user piece.
Don't use the method of throwing an item into a hot fire to burn off the crud. It will permanently discolor the piece and your seasoning will not look right.
Best advice - go to the web site I mentioned above. Go to the cleaning forum and you will have all kinds of expert advice from people who do this pretty seriously on a regular basis.
If it's a piece that has no intrinsic, collector, resale or other value. Blast and grind away. But I have found that this less intrusive method works great for those pieces as well.