I have previously alluded to the concept of world building, but never gotten into specific details about it.
This is kind of funny, really, as I approach fiction from the perspective of world building first.
I suppose I should define the term before I keep bandying it about. Basically, what I am referring to when I say "world building" is the idea of ensuring that the fictional world that the characters of your story inhabit has internal consistency.
There are two ways to do this. First, you can "world build" on the fly. Make up a few rules right at the beginning, make those rules clear through statements or actions, and then add new ones as they become relevant, invoking them whenever weird stuff happens.
The second way is much more proactive: Build the world your characters inhabit before you write the story itself. I suppose one could call this the "genesis method."
Each method has strengths and weaknesses.
The on-the-fly method is generally good if you're on a tight schedule, i.e. you're working for hire. This is how most people do it, I think. The downside is that the rules can be inconsistent with each other, actively clashing with each other and making no sense when taken together... and there's also the risk that one of the rules being stupid because one came up with it when rushing will break down the fictional construct unless an arbitrary and even stupider rule pops up.
The "genesis method" tends to be much more cohesive and holistic, creating a world that one could believe exists, and having answers for story points ready-made. Usually, exceptions to rules are either less bizarre or they don't exist because the rules themselves were more carefully considered before they were adopted. The downside: This method takes forever. (Take it from someone who knows from personal experience.)
I suppose there are many possible examples; Lord of the Rings, for instance, was written and revised over decades, while you can just tell that the comic book universes were made up completely on the fly, and any illusion of cohesiveness is just that-an illusion. But I don't feel like going into it deeply.