Go grab some paper and a pencil.
Got them? Good.
Now spend the next two hours drawing a map. Make it as detailed as you want. Add mountains, rivers, coasts, forts, impassable canyons, dense forests, ancient tombs and some of those decorative sea monsters in the ocean. Name it anything you want as long as it ends with "-ia" and don't forget to add the compass in the corner. This has to look legit.
All done? Fantastic.
Now go to the zoo during feeding time and toss it into the chimpanzee exhibit. Watch as all of your hard work is trampled on, torn apart and left hopelessly broken by a pack of ravenous animals.
Did you cry? No?
Well now you are ready to be a GM.
If you haven't taken the hint already, running a campaign can be difficult and frustrating. When you are the GM, you have a story in mind, or a least the skeleton of one, and your own vision about how things should progress, but you're not the only storyteller. Everyone seated at the table has their own agendas, tactics and interpretation of what's going on. With the chaos of it all, its easy for a campaign to unravel and its natural to get frustrated. You may have spent all week planning a big climatic battle in the heart of a starship, but when the session starts, the players just steal a few supplies and leave, completely bypassing everything you set up. Its ok to scream; no one will judge you.
That is where focus comes in.
Keeping focus is one of the most basic tools a GM can have. Basically it means steering the story back on track. Not railroading, but adding elements to the events that will bring the players' attention back to the main focus of the campaign. This can be as simple as dropping a clue in some loot they acquired to as aggressive as the party being pursued by a fleet of ships.
This isn't an excuse to force the players to only do what you have planned. The players should definitely have freedom of choice in what they want to accomplish. Keeping focus is for the situations where the players have gotten very off course from the core story, have completed a side quest and need direction or things are just getting out of hand. The latter usually only happens with very unruly or overly caffeinated groups.
Its best just to stay calm, roll with the punches and react creatively. It will keep you from murdering your tablemates.