Some cast iron comes pre-seasoned, and some has an oil coating that keeps it from rusting while it's waiting to be purchased.
No matter what kind of cast iron you have (except enameled or coated, which doesn't need seasoning) I suggest that you start your process by washing the pan first with hot, soapy water, drying it quickly, and coating it immediately with your choice of seasoning oil
I've tried a number of different oils for seasonings, and most of them are fine. I don't suggest extra virgin olive oil because it has a low smoke point. I don't like canola oil, because it tends to get gummy. Vegetable oil, peanut oil, grapeseed oil, or a solid fat like vegetable shortening works fine.
Use any oil you like. Really. It's not a deal-breaker. For this pan, I used Crisco.
Start by melting some Crisco in the pan (or pouring in a little of your liquid oil, if that's what you're using) and brushing it all over the inside. You want a very thin coating, not puddles. Let it heat until it's smoky hot, then put it into an oven set at 450 degrees. Brush oil on the outside of the pan as well. You can leave the pan right-side up, but I recommend baking it upside-down. The advantage of baking upside-down is that you won't have puddles of oil accumulating in the pan, and it will season more evenly. Bake for an hour at 450 degrees.
Note: it's a good idea to have something under the pan to catch any drippy oil, or you're going to hate me. A sheet of aluminum foil on the rack below the rack the pan is on will be just fine. I have an oven liner that sits on the bottom rack of my oven, so I just put the pan in the oven and let it rip.
Yes, it gets smoky, but it's not terrible if you don't open the oven to peek. Turn your stove hood on or have a window open. After an hour or so - it's not an exact thing, a little longer isn't going to hurt anything - turn off the oven and let the pan cool. You can leave it until the next day, if you don't need the oven for anything else.
Keep in mind that cast iron retains heat. An hour after you turn the oven off, you'll still need mitts to handle it. You don't need to leave it in the oven until it's completely cool - you can remove it from the oven and let it cool anywhere that's convenient.
DON'T be tempted to speed the cooling by dousing the hot pan in cold water. A cast iron pan is nearly indestructible, but there can be imperfections in the metal because of the way the molten metal is poured - like you see veins and layers in rock. Thermal shock can cause a cast iron pan to crack along one of those lines. And it will make a loud noise that will scare the the heck out of you. Don't ask how I know this, mkay?
When the pan is cool, scrub it with hot water and kosher salt to remove any oil residue. Don't use soap.
The grill pan you see above, when I first got it, was a silvery-black color and if you ran your finger across the ridges, you could feel sandpaper-y sharp(ish) bumps. This is completely normal. It's what happens when a pan is cast rather than spun, molded, pressed, or stamped. Can you tell I used to work in a metal-related industry?
The great thing about cast iron pans is that they're relatively inexpensive, nearly indestructible, and once they're well-seasoned, they're pretty much non-stick. I have another grill pan that's got an enamel coating, , but it's not nearly as non-stick as this one is, and I've only seasoned this one a few times - it will get even better with age and use.
You can use your pan after the first seasoning, if you like, but I usually season two or three times before I use the pan for cooking, unless I'm planning on cooking super-fatty foods in it right away. Like bacon. Or shallow-frying some chicken. Which I wouldn't be doing in a grill pan. So I seasoned it again.
After the first seasoning of this grill pan, it was a brownish black rather than silver-black. If you looked at it by itself, you might say it was black. But next to a well-seasoned pan, it was definitely a little brown. The surface was a little slicker and smoother than before.
I seasoned it one more time, brushing on a thin coating of vegetable oil. Like I said, it really doesn't matter what oil you use, as long as it's edible.
Again, it went into the oven upside-down for an hour at 450 degrees. I let it sit in the oven until it cooled, and scrubbed it with a little kosher salt again - I find this is the best way to clean any kind of cast iron pan.
The pan was slightly darker, and if you brushed your finger on the ridges, it was smoother. At this point, the pan felt like it had an enamel coating on it. There were still bumps, but the sharp-feeling sandpapery points were gone. The pan didn't feel greasy or sticky - just smooth. And drops of water beaded up on the surface. That's what we're looking for.
At this point, I deemed it ready for cooking, so I grilled some burgers. Nothing stuck to the pan, even when one of the burgers had a slight cheese-oozing problem. Mission accomplished.
But just for the heck of it, I gave it one more oil-and-bake in a 450 degree oven. And NOW the pan is just about as black as my other cast iron pans.
Once your pan is well-seasoned, you don't need to do much to it, particularly if you're using oil to cook your food, or if the food itself is fatty (like bacon). Just wash with hot water and scrub with a brush or sponge with bit of kosher salt.
If the pan is new and the seasoning is a bit thin, you can brush it with a little oil after washing and heat it on the stove until it's hot. Then let it cool and wipe the oil residue out with a paper towel.
When the seasoning is well established, just wash the pan with hot water and scrub with salt if it needs it, and make sure it's completely dry before you store it. But even with my well-seasoned pans, I sometimes give them a little oil-and-heat before storing, just to make sure I'm not losing any seasoning.
If the seasoning on your cast iron pan ever gets damaged (although I'm not sure how you'd do that) you can remove the coating by putting the pan into your oven while it's self cleaning. Or in your grill, maybe, if it gets hot enough. I've heard of doing that, but haven't tried it. This will burn off all the seasoning, and you'll need to start from scratch again, working quickly because once the coating is completely gone, the pan will want to rust. So at least get a coat of oil on it.
The only reason I can think of where I'd remove good-looking seasoning from a pan is if I bought one from a flea market or garage sale and I was concerned about what might have been cooked in the pan or what it was seasoned with. Burning off the seasoning in the pan would remove all traces of the old owner, which could be a good thing.
If you inherit a nicely seasoned cast iron pan from grandma, and she's not prone to cooking with motor oil, then there's probably no reason to ruin decades of hard-earned seasoning.