I'm going to have to cheat a little bit here.
I haven't been a "DM" in over a decade and a half, but I have been a "GM" for all kinds of games, Call of Cthulhu, Feng Shui, Warhammer Fantasy Roleplay, so I'll go with my general approach to the last, since it's a fantasy game.
To be honest, I rely heavily on the game's setting itself, if there is one available, or pick one that suits my inclinations, if entire setting/world books can be purchased and "plugged in" to the game, as I understand some of the AD&D stuff is done.
I know some people can create their own game worlds and settings and such, and more power to them, but that can be a huge undertaking, and still other people make stuff up on the fly and have no particularly established map, religion setup, monsters, themes, eras, etc., but unless you are a really experienced or just gifted creative quick-thinker, I don't recommend this for anyone but new players starting out in very casual small group games, to get used to the system.
First, before even bringing up running a game for others, familiarize yourself with the history, geography (maps) and cultures of the main and likely to be encountered areas, races, religions, magic (and views on such), and any peculiar aspects or surprises, like a different money system or something like that. Also I recommend getting an idea of the normal Earth era closest to your campaign, so you can have more time period-specific resources to draw from, to help keep things creative and add some authenticity and chance for the players to be able to get a concrete feel for things, in a game that is usually mostly pretty abstract because it is all existing totally in imagination - no people, animals or even worlds that have a solid base in reality as we the players know it.
Color and acting is very important to establishing immersion for the players. If your NPCs act more or less like question points from an online game, that might as well have question or exclamation marks over their heads, the players are not going to "get into" the game very easily. Not to say detail out everything about each NPC, but Introduce quirks to the important ones, and have some backup ideas for ones you don't expected to be sought out, even if it's just stereotypes or characters from movies or books.
Establish "reality" for the players, not just with well played and memorable NPCs (and monsters and animals for that matter), but locations and towns, as well as the general society and customs themselves - perhaps this port town smells of fish no matter where you are, it is overpopulated with overly friendly cats always looking for food and petting. Having animals constantly underfoot and crawling all over you the whole time you're in town would be a very memorable scene.
Maybe it is some sort of holy day or celebration with young men and women dancing around the maypole, to the happy and lively tunes of bards and minstrels; there could be clowns, jesters and actors, as well as local competitions, perhaps archery, wrestling, gambling, anvil throwing, etc.
Establish familiarity for locales that let the PC's feel at home and able to understand and "master", like their real-life hangouts, with friends (or rivals or enemies) that they regularly encounter and talk to and might have information (or always need something). Landmarks and other historically significant objects and buildings with their own stories could help deepen the story, such as the large rock in the middle of town that has been there since a PC was young and he used to play on it, and now people are wanting it broken and moved, or seeing the PC's initials carved into a tree or wall from oh so long ago.
Where does the PC LIVE? Do they have houses, hovels, caves, sleep out in the open, stay with someone or at an inn? Why are they adventuring? What all is in the house, how did/do they make money when not adventuring? Are there things at home or in town the PC wants to accomplish, perhaps fix the roof or donate to help pave the roads, or buy a new horse for someone so he can get his plowing done in time? How about food, drink, hobbies, law enforcement, town council, religious and similar structure?
Maybe there are actually friends and family members in town - where do they live, what do they do? How involved are the characters in their family's lives? Will these people ever be in danger, either just in general or specifically because of the adventuring life of the PC?
Considerations similar to those outlined above can really bring a game to life for players, and the best part is, if you're amiable to it as a GM, they can help create this backstory and come up with ideas and color that ties them to the area or person or which they've heard about in stories or urban legends all their lives, if it's a far off location or dungeon, etc.
Don't let monsters be one dimensional. Are all orcs or goblins really pure evil? Do they have families? Are all ogres really stupid? Are kobolds just generic monsters, or are they perhaps a band of cunning bandits, or even a tribe of nomadic foragers or even pilgrims to their own holy lands?
And don't forget larger aspects such as royalty and nobles, maybe not local ones but those which control large portions of land, and are the authorities over a great number of people - are they fair and just or greedy and deceitful? What can be done about it? Intrigue, politics and etiquette and even romance and drama are certainly not taboo subjects for helping construct a reliable foundation for players to identify people or places as "home" or "flirting barmaid", etc.
And of course, WAR. Are things going on in the world at large, that threaten to or already affect the area or people - are there drafts or voluntary signups, is the war already going on, are there special missions which the PC could carry out? Does the PC agree with the war or the side their homeland is on? Is there a conflict with another party or family member or friend, or local authority, or religious leaders and sentiment?
I can't even begin to go into the obscure possibilities for development in magic and rogues and such. Suffice it to say, there are a ton of options, infinite in fact, if the GM will but take advantage of them and present them to the players, who also need to be open minded and try to work with the GM to build an interesting world and campaign.
Related Topic about Dungeon Mastering: Too Much Detail?
That is a lot of interesting insight Jpatt.
I have made my own world and have been working on the details on and off now for almost 10 years. It is much easier to make a world work as you have more and more characters exploring the world. The one thing I try to do is set characters in a area that I have not fully developed so the game flows easier as I fill in the area as the party explores more of the area. I know what is in the area such as hills, mountains, desert or swamp land. Just all the inhabitants may not be there yet. This I think allows me to let more of my imagination unfold as I work the details in to stay ahead of the party by a day or two.
It is not a perfect system and it has flaws like any other but I find it much more flexible than a module that has very little flexibility if the party goes off on some tangent. Having more than one option open to the party gives the game more od a spontaneous feel.
I also find it helpful and fun to have characters develope the world. I set everything up the way I imagine it down to little details. Then while the players move threw the world I change it. This way the players can just go about and find their own path in the world and do whatever they feel like.
For example, I once had a bridge scene set up were the bridge was cut and the PC's fell into a raging river. Then after the players were starting the campaign I thought it would be unfair to have this happen to them as they were just starting out. After I thought about it I set the river to a more slow pace so it would be more of an agreeable set back. While changing that aspect I realized a bunch of other things and completely reworked the scene. Now the simple bridge has become a dynamic scene which never would have happened without players.
I think having a definite blueprint is best for me. However I am always looking at the situation trying to find another level to it. Thus making it more real for the players. I also try and remind myself not to box the players in or force them to play out a situation only one way. I try to leave the players at least three ways to approach a problem and have a reasonable solution.
If a player makes a comment like, "Goblins don't act like that, why would they have a fort?" I would then go back in my documents and research why I have the goblins there or try to rethink the situation. Not right away of course I would wing it at the table.
I have made four major continents in the last four years. I have played about six campaigns in them, in differing regions and time periods, and I have this to say about Dungeon Mastering; Players will break everything you ever make in your world. That big chase scene you had planned out? What if they don't run, instead using a spell to disguise themselves (or some similar circumstance)? The trick is to roll with the punches, and be aware that eventually the player will influence even the deepest aspects of story and gameplay in ways you never imagined.
The way I see it, based also on my experience, is that is wrong to give one or two or even ten different solutions to the players for a certain problem. Let them create their own solution. I like to create situations, not stories. Something is happening, usually at different levels (level 1: goblins raid the village. Level 2: to get the supplies necessary to defend their cave, goblins raid the village. Level 3: There's a big war between goblin tribes. One of the tribes betrayed its faction and now gets retaliation. To defend their cave...those goblins raid the village).
Is up to the players if they just want to solve it at level 1, 2 or 3. Depends on how much they get involved or how deep they like a game to be. The solution? There's no pre-set solution. I like to evaluate how the party approach the problem and decide which consequences in the ongoing situation will their actions have. This is the only way in which, I believe, a Master can grant total freedom. Is confusing at first, because the Pc misses a guide or a set trail, but when the players understand the mechanism becomes very rewarding.
Managing a game in this way around a table is hard: requires hours and hours of preparation for each session because you have to be ready for everything. But in Play by Post is piece of cake. You can rewrite everything at anytime and nobody will notice it. But you will never meet a dead end and the players will never feel forced in a single direction. In the example above, they can even decide to get rule over one of the warring goblin factions and crush the goblin rebels or invade the village they had to defend. Why not? Dungeons & Dragons is not starting from A to get to B, is having fun living an imaginary adventure.