As mentioned in "The unpredictability of PCs", the key to good DMing is improvising. It was also mentioned that an article about improvising would be coming soon. Well, here it is!
When you improvise, keep in mind the time. Don't make the players wait for 10 minutes for you to come up with what happens after they enter the cave. On the other hand, don't rush through it, either, as you have to make what happens reasonable, in-keeping with the rules of DMing, and fun.
In case you haven't noticed, the two are mutually exclusive, but you, as a DM, have to do them. The optimal time for improvising is usually about 5-30 seconds or so. Behind the DM screen, this is the secret life of the Dungeon Master that I hope to reveal and enrich. DMing is not just about coming up with a solution, and then making sure everyone follows it. It is also about making sure the solution appeals to all of the players.
Under all this pressure, a non-Dungeon Master may think that the role of controlling the D&D universe is a chore, something to be avoided like the plague. They would be wrong. Underneath all the fun of creating the campaign, there are tedious, tiring things to do. But under all the tedious, tiring things to do, there is always the fun of creating the campaign. And, of course, saying that improvising is a tedious, tiring thing to do, is my opinion. Some people may think it is actually a fun advantage of Dungeon Mastering that they look forward to. And you may be one of those people.
However you choose to view improvising, though, you have to do it. To bring us back to the subject, here are some tips that I discovered and found useful(Try using these the next time you write an essay... I discovered them while writing one. At least you call it an essay. In Singapore, we call it a composition.):
1)Do not choose the first thing you think of
Often it is a wild idea that the PCs will hate anyway
2)Break rule 1) as often as possible
When I say as often as possible, I mean when it's NOT a wild idea. If it's not, it's probably useful and will save you time in the long run
3)Make sure your ideas are reasonable
Even if you think carefully about your idea, MAKE SURE IT IS REASONABLE. A wild idea, which at least is different from the usual hack n' slash, is infinitely better than "As you walk into the legendary Cave of Eternal Peace, a group of demons attack you."
4)Make sure your idea is fun!
This is the golden rule. Even if the idea is carefully crafted,thought about and considered, if the PCs don't have fun, discard it forever, or at least until the next gaming group.