A lot of attention has been put on the "How to deal with the rules" aspect of GMing (very important, given), but few have mentioned the "How the heck do I make a story?" aspect of it. I hope I can answer that a bit here, though the aforementioned GM guides will go into this much better than I will.
As the GM, you are everything the Players are not: the rocks, the trees, the winding wind, the whistle of the wind, the sweet scent of the pie on Ms. Beechtree's windowsill. You are the five senses the Players use to figure out what the heck is going on, use them all. Keep a small little scrap of paper on the side of your screen reminding you to use all five senses. Get them to smell the horde of goblins, taste that potion they're quaffing (probably because it doesn't taste like anything they'd want to put in their mouths in the first place), feel the bowstring digging into their fingers. This makes for an engrossing scene, which is what we are aiming for, right?
As for making the story, you will fall into one of two categories: the guys that plan things out in advance, or the lucky jerks that can improvise one on the spot. Speaking as one of those lucky jerks (though it took training, boy howdy!) even if you improvise, you should plan out a general direction you want your game to go. In planning ahead, realize those Players of yours are smart and have a tendency to lay waste to the best laid of plans. As such, be prepared to improvise a lot.
If you ARE going to plan things out in detail, a list of a few things to avoid:
1) Overly complex riddles that bar the way forward. Riddles are great, but if you're going to use them as blockades, make them simple or have multiple ways to be solved. If you want a complex riddle, consider making it optional, perhaps a sort of "bonus room" locking away a really nice ring or some-such.
2)The "That's Cool, but Not What I Planned You To Do" syndrome. When you're GMing, you're all about making the players look cool. If they've come up with a better solution than you thought of, take advantage of it, especially if it gets the plot moving forward. If they've figured out the acid-trap mechanism and launch it at the boss, give them a moment of smug satisfaction and a nice "Oh CRAP!" look on the boss as poetic irony melts his face a bit. This cuts both ways though. If your barbarian goes "I certainly hope there's no ghouls behind this door..." and a ghoul-in-the-room fits in PERFECTLY, say "Thanks there "PlayerName"!" and have everyone else slap the barbarian a good one. Proviso: This is only if they can take a ghoul. If they're down to nothing, let the barbarian slam the door and bolt it and throw the wasn't-there-before-but-now-there-is table against it. You still get a free ghoul, the party doesn't die and you have a bonus smug grin!
3)Letting the Face characters hog the spotlight. Sure, they're made to be up in front and all, but give the other players that don't actively take the spotlight a chance to shine out of combat as well. Make Ranger and Druid companion rituals actual events instead of "poof, now I have a doggie!" appearing acts. Go into detail on how that supporting Mechanic carefully patches up the spy group's car with the care of a doctor examining a patient. These players definitely appreciate it, even if they don't show it immediately.
4) Let the Rolls you make get in the way of the Game. Sometimes, you have to fudge. Players expect you to, especially if it makes for a more enjoyable game. If one player seems to be having a spot of bad luck, fudge a roll for them. Say the ghoul tripped on a rock or something. Multiple, systemic failure that is not player-generated is not fun (systemic failure that IS player-generated is hilarious, but don't let them die from it, unless it IS truly stupid.)
5) Let the Game get in the way of the Fun. We, as GMs, are not the player's adversaries, contrary to most outside views of roleplaying in general. Fun is our prime directive. If the game ceases to be fun for the players, ask them if they want to scrap it. There's always more adventurers out there to take care of stuff you give them a head-start on. Does it hurt when the players don't want to play your game? Yeah. It hurts a lot. You want to take it personally, but remind yourself why you're here in the first place: for them, and you, to have fun. It takes a lot of courage to do this, and I wouldn't say it if it didn't happen to me (boy...did it ever). The traps, dungeons, monsters, heck, even entire villains and allies and storylines can be ported over to another game. Usually, it's cosmetic issues with the world that cause the tension, or perhaps the group dynamic simply doesn't fit. It doesn't mean your effort is ruined, just delayed.
Longwinded, yes. Tis one of my flaws. Being a GM is an art that can never be perfected. Anyone that says they're a perfect GM needs to be pants'd and hung upside down for a few minutes. Always remember there's more to learn, more to perfect, more to do better. Never forget that first game you both played and GM'd. One day, you'll be the mentor in a game someone else is starting in and you will guide them on the path you took. Be humble, be ruthless (when it's fun), be merciful (when you can't be ruthless), and don't forget to let the players stew for a bit every once in a while ;)