A DM is an author, storyteller, and referee, each at a different point of the game. When planning the adventure, the DM is an author, designing whatever challenges he feels is appropriate (from easy to killer DMs like me). During the game, the DM is a storyteller, advancing the game with descriptions and narrations, that hopefully immerse the players into the setting. When an action is being taken, the DM becomes a referee, determining the outcome, as noted by the rules of the edition and houserules.
The importance of the term referee is that when determining the outcome of an action, the DM is intended to be a completely neutral arbiter. In theory, this means that the DM should not fudge dice or make adjustments on the fly to "enhance" the game experience. If a character dies due to a critical hit (as happened in my game earlier today), they die. In the reverse, if the players are crushing your BBEG, you shouldn't give him more HP or boost his attack/damage. This hearkens back to the idea that this is a game, not just improve storytelling. It has become quite common for DMs to have a bias, especially for the sake of their designed story, since the emphasis on the "game" of RPG has been diminished.