I've read a short passage on GMing noting that improvisation is very important. But I can't seem to do it right. Does anyone have any suggestions for me that could help me improvise better? As in, is there an easy way to easily generate a full world in about 5 seconds?
Here's a crash course.
Improvisation is about building on each other's ideas.
That starts with accepting each other's ideas. So, when another player proposes something, roll with it. For example, if someone says "Is there a chandelier or something I can swing on?" Yes, sure, why not!
In fact, don't just say "Yes" and leave it at that. Add something. Say "Yes, and..." (add more) or "Yes, but..." (add a complication).
Improvisation is about doing what comes naturally.
So, don't overthink things. Don't stress about being perfect. Just say one of the first things that comes to mind!
This isn't just to keep the game moving. We're being obvious because the "obvious" thing is often way, way better than the "clever" thing. That seems counterintuitive, perhaps, but the "obvious" thing is the one that makes sense. Which is exactly what you need to make a satisfying dramatic story: events that flow naturally; without that core structure, the twists and surprises and dramatic reveals don't actually mean anything.
Consistent themes and an economy of elements are the hallmarks of a good story. Oftentimes an element introduced in Act 1 will appear again, with greater importance, in Act 3 (see "Chekhov's gun").
It's easy and really satisfying to do this in improvisational roleplaying. Probably the most common example is reusing NPCs — bringing back someone the PCs met previously is a great way to make the players feel more connected to the world. Likewise, bits of scenery or random facts can suddenly become important in light of new events.
These connections will just pop out at you in play. You just need to keep your eyes open and embrace them.
(It's Okay to Prep... A Little Bit)
When you're improvising heavily, it can still make sense to do some preparation. Just focus your prep on activities that enable improvisation rather than replacing it. For example, maybe you're skittish about introducing NPCs on-the-fly; figure out what you find most difficult about NPCs (for me, it's names) and prepare that stuff ahead of time so you just have a list of ready-made elements to pull in and fill gaps whenever you need to.
Whatever you do prepare, hold it lightly. If it doesn't fit, don't force it. Your prep is just to make improvisation simpler; it doesn't replace what you do in play.
Improvising is a skill, and takes practice. Some GMs are naturally good at thinking on their feet; some struggle with working beyond what they've written on the page.
That being said, three things can help: practice, preparation, and feedback. If you want to improvise better, you have to do it badly first. Run games, and be bad at it. Make up responses when players do something crazy. Theater improv can help some, as can improv games (like the ones you see on Whose Line Is It Anyway?), but there's a difference between improvising on stage and improvising behind a screen.
Another thing you can do is prepare. If you're running a pre-written module, try and find what's missing. Think about what you would do, and about what your buddies would do, and what you'd never do but someone would. Think about responses to those actions, and write them down so you'll remember them better. If you've thought out things beforehand, you'll be better able to use those ideas when they come up in game. You can't prepare for everything, but you can prepare for a lot.
Finally, after you've run a game, ask the players what they liked. Which plots, which characters, which moments were their favorite? Least favorite? This feedback can give you an indication on how you're doing, in terms of improv and in general.
One thing that you can do in improvisational moments is invite the players to participate. If they break into a house you haven't described, say "what do you think it looks like?". To some players this doesn't work terribly well because it kind of pulls the curtain down and exposes the proverbial wizard behind it, but I've got to say: you really should not IMO be required to create everything everywhere at all times. I don't want to make this sound like an inborn punishment but I think players to some extent need to realize that when they go off the "rails", so to speak, it's not going to be like a CRPG where someone spent a thousand or more hours creating an old shack in the middle of nowhere. Stuff is going to be a bit less plotted out than they should otherwise expect (note that if you get good at improv, your players might start to prefer this).
The other thing to bear in mind when you're improvising is that players will not necessarily know when you haven't planned something out and when you have. One upside of being a new GM is that chances are, you're playing with new players as well, and that in turn means that they aren't necessarily skilled at knowing when you're just making it up as you go along.
One good thing you can do to help with "improv" is to get a hold of a few separate one-shot adventures which are party-level appropriate. If you're playing 4E, for instance, a subscription to DDI can often give you access to a couple of pretty decently made adventures. That way, if the party then goes way, way off into the middle of nowhere in the middle of a session, you can have them come across one of those adventures. Try to find ways to either make it clear that this is not part of the main adventure (so that your players won't wonder WTF it has to do with the upcoming zombie invasion) or, better, try to pop something in that makes some kind of oblique reference to the primary adventure. Perhaps a clue that says "Bargle, have I got a job for you and your team of orc mercenaries! Meet me at the abandoned mine in the middle of Scotbridge Forest>", that kind of thing.
Finally, depending on how much time you have left in a gaming session, you can kind of play the equivalent of what the NFL calls "prevent defense". Come up with what you can, toss up some a few hooks to see if the players catch it, and see if you can end the game as soon as the party has made a decision. You can then go home and plan out the next session now that you know what your guys are going to do.
I should add here that a lot of people - myself included to a great extent - actually prefer open-ended, non-planned-out style games. I for one think that GMs often tend to do way too much extra work before sessions, and even if you're not doing the kind of thing that feels like "work" - building up your milieu, for instance - chances are that the players might have a lot of fun with that as well, and you should include them on it (for that example, I highly recommend the story game Microscope). This method requires a lot of your players as well, and not everyone is up for it, but I find it fun anyway.