The job is short to describe and long to get good at. You describe a world, and you play everyone in it who is not a player character. Nobody is good at this on the first night, and nobody needs to be — it is learnable, and it gets easier every session you run.
Three things, and only three. You describe the world: the room, the weather, what the guard says back. You play everyone in it who is not at the table — every nonplayer character the party meets, from the innkeeper to the thing behind the door. And you decide when the outcome is genuinely in doubt, which is the moment a D20 Test is called for. Nothing else is really the job — the rest is how you do those three things well. For the loop from the other side of the table, see Playing the Game.
You decide what exists. A DM who wanted the party dead would not need dice to arrange it — a locked door that never opens, a fall that is simply fatal, would do it in a sentence. The game has no side for you to win, so there is nothing to be won by beating the players. Your job is to make the world react honestly to what they do, not to stand against them.
Nobody does, and nobody ever will. When a rule is unclear mid-session, make a call and keep playing. Look it up afterwards if it matters. A wrong ruling made in five seconds costs the table less than a right one made after five minutes of flipping pages, and most rulings do not come up again before you have had time to check.
What you prepare is a situation — who wants what, what happens if nobody intervenes. What happens after that belongs to the players. A plot assumes they will do the thing you planned for; a situation survives them doing something else entirely, which they will.
Two scales, and it is worth having the words for them before the rest of this chapter uses them. An adventure is one arc, start to finish. A campaign is a string of adventures played by the same characters, one after another. Most tables run a campaign; you only ever prepare one adventure at a time.
Three things, in this order. Read the rest of this chapter — it covers what running a session actually involves, week to week. Prepare a situation, not a plot, for your first session, following Preparing a Session. And before you sit down to run it, read Setting Difficulty — it is the last thing to settle before your first roll.