Preparing to Improvise
One of the most common things I've heard from people wanting to run their own Role Playing Game (RPG), but afraid to do so is that they're put off by the idea of how much prep is needed or facing a group of players and not knowing what to do next.
While these might seem like big hurdles, they really don't need to be.
The TL;DR
Plan your Non Player Character (NPC) motivations not physical scenes
Tell stories collaboratively, 'yes, and' and 'no, but'
Have a full range of stats ready for various levels of competency
Use snappy statements, not block text
The players are on your side
Motivation not Scene
Key scenes are a pitfall I see with many GMs. These are often meticulously detailed with precise maps and detailed descriptions, block text to read out of what the players see or what the NPCs say (I'll come on to that). Often this commitment and preparation results in a scene that the GM has to have in the game no matter what the players want.
It may be that you love the idea of a scene set in the ancient tomb filled with the golden treasures of a long distant past. Perhaps you're keen on the visual of Darius (your bad guy) lifting the Book of the Dead out of the sarcophagus of the last Pharaoh of the third age as the players enter, but if that isn't what the players are interested in, you're going to be frustrated when they don't go there. Instead plan what your NPCs are going to do and what motivates them and let the story flow from there.
In the example above Darius has travelled to the tomb, survived the various traps and ignored the other treasures to collect the book because he lost his son four years ago. He believes he can bring him back using the magic it contains, but what he doesn't know is that while the book will revive his son, it will also awaken Anubis and his legions of the dead.
Darius isn't just a decorative feature in the story now, he's a living breathing character. If the players ignore the clues that lead to the tomb he'll go ahead and bring back his son (and Anubis). This results in a story that moves on and is more interesting because of the player choices rather than frustrated by them.
You also have another great gain with this type of approach in that the players can take different routes to resolve the encounter. Maybe they can convince Darius of the terror he'll unleash and he'll stop (perhaps looking elsewhere for a solution and the beginnings of a new adventure), or maybe he won't care what it does to others as long as he gets his son back.
It may not be immediately obvious but a follow up question you should have is - what is Anubis' motivation, who are his legions trying to destroy and why...? This type of preparation isn't particularly visible and doesn't require mountains of notes, but it will give you the ability to answer any questions about how an NPC reacts and why.
Collaborative Storytelling
You must understand that in an RPG you're telling a story with your players, not for them. They didn't come to hear the latest instalment in your novel, they came to play fantastic people facing dramatic challenges and want to see if they can figure out a way for their characters to survive and triumph. Let them play and make decisions.
There has to be some control on the GMs part, it impossible to bring anything to the table without it, but you must also give you players options. 'Yes, and' and 'No, but' are simple tricks from improvisation classes for actors.
Where a player suggests a course of action that's in keeping with character and story you should always try to say 'yes'. The 'and' lets you add nuance or give more detail but let their idea stand. Where a player tries something that breaks the story or is outside where you think the story should be you can say 'no', but by adding a 'but' you can suggest there is something and reward their creativity.
Player A asks: "Is there a small statue of a cat in the room?"
GM: "Yes, and its in a pile close to you, its made of gold and its eyes are some kind of green gem."
Player B asks: "Can I set light to the treasure?"
GM: "No, but there are tapestries on the walls on both sides of the room"
Prepare competency stat blocks
Another challenge that frequently occurs is when your players put an NPC in a situation you weren't expecting. You should have a full stat block for major characters, but occasionally players are just set on interrogating the barman about history or attacking the grapefruit merchant and even the most prepared Gm is unlikely to have full stats for these. I mostly run 5th Edition Dungeons & Dragons currently, but this advice is as valid for any system that uses skills and stats.
Keep a full set of stats on hand for a Novice, Journeyman and Master. The Novice should have a poor chance to succeed on anything they try, while the Journeyman, barring unfavourable circumstances should be likely to succeed. The Master should succeed even in the face of difficulties.
This way when an unexpected roll is called for I can consider what level of competency the NPC is likely to have in an area and use the appropriate stat from Novice, Journeyman or Master.
No block text
When the players enter the room read this:
"You enter the tomb, its vaulted ceiling lost in the darkness above your torchlight. Laid out in rows that form a path to the far end are sarcophagi and around each are piled coins, statues cast in precious metals and gem encrusted jewellery. On the far side of the room in the centre is a larger coffin raised on a dais. Its stone lid is pushed back and standing next to it is a tall man in green robes with long blond hair; around his wrists are delicately carved bracelets encrusted with gems. 'At last' he sighs as he reaches in and pulls out a gold plated book, 'Julian, you will return to me'. He turns and sees the group in the entrance and shouts out 'Don't come any closer, I have searched for years for this place and this is my prize - you can have everything else, but I'm leaving with this book and nothing you can do will stop me' as he finishes speaking he reaches under his robes for a weapon."
Lots of published adventures do this, but it is, in my opinion, a really bad practice and you really shouldn't waste your time preparing this for your own adventures or campaigns.
In the first instance rarely do the player approach in the way pre-written text suggests. It may be something as disruptive as one of the players sneaking in ahead unseen, or as silly as them using lanterns not torches. This type of text also tends to miss important details, in this case how many sarcophagi on each side, that the players will want to know to guide their actions.
I've also rarely seen a group of players who wait for you to finish a long speech from an NPC. Generally they declare that they're not listening and start to describe what their character is doing.
Maps and images really are your friends here. This image gives you more information in just a brief glimpse than the whole paragraph above and took less than 5 minutes to create.
That said, where you need to describe start with a very simple description. Give the players as little as possible so that they have a sense of the room, they will start to ask you questions about the things that interest them:
"The room contains eleven sarcophagi each surrounded by treasure. They are arranged in rows with five on each side forming a path to the eleventh which sits on a raised dais. The lid has been pushed back and next to it stands a tall blond man in green robes."
Finally for new GMs, remember, the players are on your side, they came to play and have fun, so if you need a moment when they do something you weren't prepared for ask for a second while you think about it.