1) There are basically 3 styles of campaign: Dungeon Crawl, Monty Hall, and Monty Python. It's important to know what your players are looking for when planning your game.
--Dungeon Crawl is probably the most "traditional". It focuses on exploration of monster and trap-infested areas, questing for something or someone. Generally not a lot of choice in where the story goes and pretty combat heavy.
--Monty Hall campaigns focus on giving the players broad choices, where some are positive and some are negative, but the players might not be able to tell which is which until it is too late. These lend themselves well to games focused more on courtly intrigue than heavy combat.
--Monty Python campaigns are just goofy and fun above all else, including story cohesion.
2) Plan multiple routes for the story to go, but also be willing to improvise. You never know where your players will want to take things.
3) Always, always, always have at the ready an encounter with a group of level-appropriate random enemies. (My group always calls this "Ninjas attack!", regardless of what the enemies actually are.) If the players ever deviate too far from the plot that you have scripted out, you have this group try to ambush the party and fight them. This will probably end the session and buy yourself time to plan for the direction they are taking the story before you get back together to play again.
4) It's fine if a player character dies, especially if that player made a bad decision that led to it or got consistently terrible die rolls for a while. It helps maintain tension. A total party kill (TPK), however, is usually the fault of the DM. A more experienced DM I used to play with had two almost iron-clad rules: "No PCs die in the first session"; and "If everybody dies, nobody dies".
5) Remember, first and foremost, your job is to facilitate the players having fun (and hopefully have fun yourself).