'What the DM does' is a pretty big question!
In a game of Dungeons and Dragons, all but one player control a single character called a Player Character (PC). These characters are the heroes of the story. A player makes all the decisions for that character.
The DM doesn't have a PC to control. Instead, the DM controls evreything else in the world! The DM designs adventures, plans encounters, and controls everyone the players meet - from vicious dragons to friendly merchants.
Setting up a game can be as simple as reading a pre-written adventure (such as Kobold Manor, included in the 4e DMs guide, or Keep on the Shadowfell, the first published 4e adventure) or drawing a map with a few rooms and deciding what monsters live in it. Or it can be as complicated as planning out entire regions and devising complex plots for the PCs to discover.
Its very important to remember that the DM is not an opponent - D&D is not a competitive game. The DM is more like a mix between a referee and a director, guiding the game and arbitrating the rules.
Its best to try a few game as a player before trying to DM, but if you don't have that luxury, don't be intimidated - as long as everyone is having fun, there's no right or wrong way to DM.
If you want detailed advice, try visiting the WotC forums and chat at www.wizard.com/dnd. There's lots of good advice, and I think they run weekly online intro games in the chatrooms.
If you are going to DM, you want to have (or at least have access to and have read) the Player's Handboook, which contains the core of the rules and the Dungeon Master's Guide, which has a lot of good tips and useful advice on setting up encounters. You'll probably also want the Monster Manual to provide you with some fearsome foes.
Good luck and have fun!