The DM has to find a balance between planning and improvising (don't know whether this is proper english

).
If you plan too much and players are doing something unexpected (remember they are humans, no machines) your campaign could be ruined.
If you don't plan at all, the story becomes confusing and not credible.
This balance can only be found by practise, practise and some more practise.
And remember, the goal of playing is:
HAVING FUN!!!! Give the players what they want. (high-level vs. low-level, rpg vs. lots of fights, etc)