As the Dungeon Master, you are the architect of the the story and world that it is played in...You are the mini-god of this universe. You are also there to work with the players cooperating to help them experience the adventure.
As the Dungeon Master, you create the environment your players will explore, whether it is a steamy jungle, a barren desert, or a mystically floating fortress built out of the bones of a now deceased god. You also present the story hook and the challenges that the players will face. Learning to balance the difficulty, and the excitement of an adventure can be a daunting task.
The "DM" as we will call them, is always seeking to challenge the players but is also there to assist them in game. It is easy to treat yourself as a callous and vengeful being that gets to play with lesser mortals by torturing them, but that quickly leads to an unhealthy competition between the players and the DM. While you want your players to be forced to think and work hard to overcome challenges, the game should still be fun, not funereal.