I talk a lot in here about games that I improvise, and today I want to tell you how I do it, 'cause I believe that maybe, it might help you to advance the game when it's stuck or to GM a game spontaneously.
The first trick that I use is to know the genre and style of the game I want to GM. If it's a horror game, I start to go through horror plots and motives that I know well. If it's a high fantasy game, it will probably be close to books like LOTR or Dragonlance or the like. The genre is a place to both draw inspiration from, and a place to go back to when something goes wrong. Knowing the genre well also helps to get the feel of the game right.
The second trick that I use is to know the PCs well. If one of my players wrote in his/her character's background that this character's parents were killed by orcs and I need and enemy, I can use orcs, or I can connect the dead parents to a different monster, as a twist ("they only pretended they were orcs. They are, actually, a kind of evil vamps..."). When improvising a game from scratch, it's usually a good idea to ask the players a few things about their characters, to get the imagination engines rolling.
Another trick is to never say just a regular yes/no, but to add the and/but at the end. "I try to hit him. -You hit him, and he's now on the floor, calling for help..." Or: "I try to break the door. -It is broken now, but you made a lot of noise while breaking it and footsteps are heard from afar..." With adding a simple word and a sentence, an entirely new situation is now created.
This concept can be further advanced: You can let the players give you the ideas. "Is there a barrel? -Yes, but its 20 feet away." The players are now creating the scene, adding the little details and letting you concentrate on other things, which may be far more important.