Animal fats. Not vegetable oils. Vegetable oils polymerize to a sticky substance. Animal fats carbonize and protect the metal. Also using a metal spatula is a must in cast iron. The metal spatula keeps the surface smooth which enhances the non-stick property. Also wash after use and spread a little fat in it to prevent rusting. Don't scour. Just wash with soap and water.
You can use vegetable oils but it will be difficult to clean. Deglazing doesn't work well on polymerized oil. Baking soda will dissolve the sticky goo.