Check out the link in the bottom of my sig. I find that by using that method I can do some fairly minimal planning to start with, and then expand in the direction the players take the game.
Ultimately you have to be able to plan to improvise and to improvise plans. Exactly how much of each depends on you as a person.
I'm a planner. I go to a session with a couple random encounters already rolled up and on standby to buy myself time to think if the players do something completely unexpected. They're not as entertaining as the "scripted*" encounters, but I can't just fly completely by the seat of my pants.
*Scripted in this case meaning encounters that I expected the players to get to based on the plot they're pursuing and their previous behavior. I can't improvise worth crap, but I can read people like so many open books.
If you've never DM'ed before ever, then I strongly suggest starting off with a rules light game. It's damned difficult to teach yourself a new skill and teach the people you're playing with a complex system at the same time.
Whatever system you go with, make sure you know the rules pretty thoroughly. The less you have to look up during play the better.
Don't look stuff up during play unless you absolutely have to. Make up something that sounds about right, then look it up after the session to be sure. If you made a mistake own up to it and retcon if necessary.
Always remember the DM's mantra: It's our story, not my story.