Use an oil with a high smoke point, rice bran oil works for me. When you coat it with oil, try and wipe it all off. Then the oven at 400 for an hour, let it cool, repeat.
Essentially you are trying to turn the oil into a hardened residue (polymerisation?) that is bonded to the metal. Too much and it will clump into spotty lumps as it bonds to itself, not the pan. Thats also why the heat is important, you dont want it to still be oily.
Having said that I have also had good results from deep frying stuff in cast iron and getting some sort of seasoning from that - it just doesn't last as long. Be wary of the "just leave the grease in the pan" approach, that can go bad sometimes and give you plenty of time on the bog to reflect on your learnings.
Bookmarks