The following is text from the "Dungeons & Dragons Dungeons Master's Guide", third edition (copyright 2000). This is selected text which reveals the authors' view of what roleplaying is and the responsibilities of GM and players.
Chapter 1: Dungeon Mastering, page 7
Dungeon Mastering involves writing, planning, acting, refereeing, arbitrating, and facilitating. When you're the Dungeon Master, you're the focus of the game. If the game's fun, it will be to your credit. If it's a failure, you'll get the blame. But don't worry -- running a D&D game is not as hard as it may seem at first. (But don't tell the players that!)
Listed below are some of the different duties of the DM. You'll find that you like some more than others. Like in any hobby, focus on what you enjoy the most, but remember that all the other duties are also important.
Your primary role in the game is to create and present adventures in which the other players can play their characters. To accomplish this, you need to spend some amount of time -- sometimes a great amount of time -- outside the game, preparing. This is true whether you create your own adventures or use prepared adventures that you have purchased.
Creating adventures takes a great deal of time. Many DMs find that they spend more time getting ready for the game than they do at the table actually playing. These same DMs usually find this creation time the most fun and rewarding part of being a Dungeon Master. ...
Chapter 1: Dungeon Mastering, page 8
The DM provides the adventure and the world. The players and the DM work together to create the game as a whole. However, it's your responsibility to guide the way the game is played. The best way to accomplish this is learning what the players want and figuring out what you want as well. Many styles of play exist, but a few are detailed below as examples.
The PCs kick in the dungeon door, fight the monsters, and get the treasure. This style of play is straightforward, fun, exciting, and action oriented. Very little time is spent on developing personas for the player characters, roleplaying noncombat encounters, and discussing situations other than what's going on in the dungeon.
In such a game, let the PCs face most clearly evil monsters and opponents and meet clearly good helpful NPCs (occasionally). Don't expect PCs to anguish over what to do with the prisoners, or whether it's right or wrong to invade and wipe out the bugbear lair. Don't bother too much with money or time spent in town. Do whatever it takes to get the PCs back into the action as quickly as possible. Character motivation need be no more developed than a desire to kill monsters and acquire treasure.
Rules and game balance are very important in this style of play, Characters with combat ability greater than their fellows lead to unfair situations in which the players of the overpowered characters can handle more of the challenges and thus have more fun. If you're using this style, be very careful about adjudicating rules and think long and hard about additions or changes to the rules before making them.
The Free City of Greyhawk is threatened by political turmoil. The PCs must convince the members of the ruling council to resolve their differences, but can only do so after they have come to terms with their own differing outlooks and agendas. This style of gaming is complex, deep, and challenging. The focus isn't on combat but on talking, developing in-game personas, and character interaction. Whole gaming sessions may pass without a single die being rolled.
In this style of game, the NPCs should be as complex and richly detailed as the PCs -- although focus should be on motivation and personality, not game statistics. Expect long digressions about what each player wants his or her character to do, and why. Going to a store to buy iron rations and rope can be as important an encounter as fighting orcs. (And don't expect the PCs to fight the orcs at all unless their characters are motivated to do so.) A character will sometimes take actions against his player's better judgment, because "that's what the _character_ would do". Adventures deal mostly with negotiations, political maneuverings, and character interaction. Players talk about the "story" that they are collectively creating.
Rules become less important in this style. Since combat isn't the focus, game mechanics take a back seat to character development. Skills take precedence over combat bonuses, and even then the actual numbers often don't mean much. Feel free to change rules to fit the player's roleplaying needs. You may even want to streamline the combat system so it takes less time away from the story.
Most campaigns are going to fall between these two extremes. There's plenty of action, but there's a storyline and interaction as characters too. Players will develop their characters, but they'll be eager to get into a fight as well. Provide a nice mixture of roleplaying encounters and combat encounters. Even in a dungeon you can present NPCs that aren't meant to be fought but rather helped out, negotiated with, or just talked to.