Seasoning:
This can get into a religious war fairly easily, since a lot of people have success (or failure) with different methods. I am by no means an expert, and what I am presenting is a combination of other folks experience and some science and common sense. If you have a method that works for you - great!
The raw cast iron will rust quickly and the rust contaminate food. The seasoning layer prevents most rust and keeps the food - and especially the acids in food - away from the iron. A secondary property is that it forms a base for a low-stick surface that is non-toxic.
Seasonings start out as oil or fat. Both have resistance to water, are edible, and can prevent rust. Different oils and fats have different properties, both in their natural state and when heated above their smoke point.
I like to think of the seasoning layer as a varnish, as it has much the same purpose and characteristics.
To be sure that there is no water under the seasoning, after the raw cast iron piece is thoroughly cleaned and wiped dry, it is heated - preferably to just above the boiling point of water, so that trapped water can escape as steam or water vapor.
While it is still hot, a rag or other tool is used to wipe on a thin layer of the initial seasoning mix. This is then wiped off as much as possible, leaving only what is in the pores and crevices. The piece then goes in an oven at a higher temperature.
Here is where things can get tricky. Oil and fats go through various stages as the temperature increases, and the exact temperatures will change depending on the fat or oil, and how the coating behaves will vary depending on what is used. Skipping the mysticism of a "perfect" seasoning, go back to the basics and purpose. The seasoning is to prevent rust, minimize some of the etching of iron into food, and only then create a base for a semi non-stick surface.
Recently, pure flax oil has been touted as making a hard and impervious seasoning that can take abuse. Reference is made to the linseed oil (which is flax oil) used by the painting masters of the last centuries to preserve and protect their artwork. There is a problem with that. Almost all of those surfaces are cracked or chipped. There even is a photoshop filter to imitate old paintings. The name of the filter is crackalure.
In my way of thinking, a perfectly hard surface that will develop cracks over time is not ideal. Something softer that acts more like a very stiff rubber deflecting blows from spatulas seems more appropriate.
A suggestion of walnut oil seems a little less hard than flax oil, and then choices descend into peanut, corn, canola, soy, and olive oil. All will work, and personal preference is fine. I do have one note about the concern of olive oil and some of the other oils turning rancid. That might occur in oil added after cooking to keep the surface slick, but in the seasoning process all the oils are heated above their smoke points. That changes the unsaturated fats into a varnish or other product that cannot absorb the oxygen or moisture needed to turn rancid.
The historical standard for seasoning cast iron has always been animal fat, typically lard. There is good reason for that. It is tenacious, flexible, easily added to or "patched" and a good base for non-stick.
In experimenting, I put a heavier than normal coating of lard on my Dutch oven and baked it at 325 for an hour. After that hour, the coating was tacky in the same way that a partially dried coating of shellac is tacky to the touch. In different terms, the polymerization of it was not complete. It did very happily accept another coat of fat though, and when baked at 425 for two hours formed a solid varnish.
While this thick coating is really good for a Dutch oven that may be cooking acid foods, it is not good for a skillet or pan. Those want a flat surface unmarred by blobs or runs of the seasoning. For those, starting the seasoning baking and then coming back in at five minutes and again dry wiping excess fat before it starts to get tacky will help achieve that flat surface.
How many coatings of seasoning should there be? The more the merrier. Two or three is a minimum, six is commonly recommended, but if coatings are thin, or the piece will be exposed to strong acids, then more may be desirable.
The end result is a piece TOTALLY covered in seasoning that is hard (in that it isn't tacky). That then gets oiled in whatever oil you use for cooking.
So how does the non-stick work?
I've seen videos of eggs being cooked and not sticking on both machined shining pans and on the pebbly new Lodge pans. What makes the non-stick is pre-heating the pan until a drop of water shimmers and dances on it before any food is placed on it other than the coating of oil.
The egg has moisture. It turns to steam when it hits the pan. Oil and water don't mix and the steam slightly lifts the egg protein to keep it from binding to anything in the pan. The protein in the egg forms a solid surface quickly, and once that surface is formed, the egg will slide around on the oil.
If the pan is not hot enough, or there isn't a sheen of oil, the egg can stick, making cleanup a mess.
With cornbread, remember that the instruction is to have the skillet preheated with some oil/lard added just before the mix is dumped into the pan. The sizzling you hear is that solid layer forming from the heat of the fat and skillet. That is why it will literally fall out of the pan when done in a properly seasoned skillet.
Why does the seasoned cast iron turn black over time?
Some of the black comes from carbonization of the seasoning and left over food, but in looking at the chemistry involved, I think that what remains of any red rust gets converted to black rust, and heated iron particles from the pan that get trapped in the seasoning turn into black rust. Again, temperatures are low enough that mill scale (FeO) is unlikely to form.
Side notes:
Cooking chives or green onions until burnt in a freshly seasoned pan seems popular. There may be some chemical change, but my guess is the charcoal formed with the little bit of sulfur may add a carbon compound somehow. Sauteing greens like spinach adds oxalic acid, which may also help the coating rather than destroy it.
There is an increased uptake of iron to the body if you cook in cast iron. That can be a help to some and a concern to others.
Soap. There is a difference between soap (with lye) and dishwashing detergent (no lie!)
You can use dishwashing liquid to safely help clean a pan if you rinse and dry quickly and properly. One site made the observation that if dishwashing soap was so powerful that it would destroy a layer of seasoning there would be no need for oven cleaners, as what builds up inside the oven is simply a variation of the same seasoning and the dishwashing detergent would remove it with ease.
Can there be cast iron that is "bad"?
Maybe, but it would be unusual. Much more likely is a seasoning that was improperly applied and incorrect understanding of how to use cast iron. Cold iron doesn't work well. To test for "bad" iron, I would use a bench grinder on a part of it and look at the sparks produced. Different alloys make different sparks.
Waiting for cast iron to heat, while also avoiding using a high burner heat that could cause warping or a crack is time consuming. I have found that a non-contact infrared thermometer is very helpful in the kitchen. I can check to see if a pan is up to temperature without any cold spots, keep from overheating a skillet, and double check oven temperatures in a flash. I find it more reliable than the dancing water beads.
Again, I am no expert, but I do like to learn and try to make sense of what I learn. If you cook successfully on cast iron all the time, I bow to your skill and art.