It's a larger commitment than simply playing in a game. GMs may run their game as frequently or infrequently as they wish; some gamers meet once a week or once a month, others only two or three times a year.
GMs may choose to run a game based on a published game world, with the maps and history already in place; such gameworlds often have pre-written adventures. Alternately, the GM might enjoy building their own world and scripting their own adventures.
A GM can easily run one-shot, unconnected adventures each time their gaming group convenes; in this case there is no connected plot, and the players can choose to play different characters in each session. However, a devoted gamemaster can string many such adventures into a game campaign, in which the same heroes fight many different monsters and a few recurring villains, gaining treasure, reputation and power as they go. Such campaigns can last for years, even decades, earning a great deal of loyalty from their players, even as some players join or leave the game along the way.
A good gamemaster draws the players into the adventure, making it enjoyable for everyone. Good gamemasters have quick minds, sharp wits, and rich imaginations. Gamemasters must also maintain balance - hideously overpowered monsters or players are no fun!
However, there is a rare but well-known type known as the "killer GM". This type of gamemaster enjoys killing the PCs, meaning that the imaginary character "dies" in the same way a character in a novel might -- they cannot go forward in the story, short of in-game mechanics like magical resurrection. The GM might get satisfaction out of creating monsters with very powerful game statistics, or designing fiendish traps that are virtually impossible for the characters to escape, but such a GM is likely to have trouble keeping players coming back for more adventures.
Days or weeks before a game session, the GM decides on the plot of the adventure which the players are to face. Choosing a monster that will be tough but not deadly for the current power level of the characters played by the gamers in her group, she decides that the heroes are going to rescue a young prince kidnapped by an ogre. She makes a map of the ogre's lair, makes notes about the ogre's game statistics, and decides whether there are any other challenges (such as terrain or weather) that the party must face. She creates a memorable NPC, the prince's hideous and hysterical nanny, who will run up to the PCs on the road and beg them to help save the prince.
On game day, the players gather around a table at the GM's house. The GM reminds the players of the game's setting and picks up the story where they left off, with the characters travelling on the road after their last adventure. She describes the nanny's appearance as she makes her plea for help.
As the PCs consider themselves heroes, the GM can expect them to agree. Since the trail will be cold before they can return the nanny to town, they must bring her along as they follow the tracks of the ogre. The GM asks them to use dice to test whether they succeed at using their tracking skill.
The GM also uses whatever acting abilities she possesses to "act out" the character of the nanny, wailing and fearful and clumsy, making sure that the heroes don't get the advantage of surprise. This also leads the PCs to interact with the NPC, "acting out" their own parts as they try to convince her to be quiet. This helps to create a deeper role-playing experience, where the player, instead of saying, "My character tells her to be quiet," or even "I tell her to be quiet," is led into role-playing with the GM:
In a straightfoward adventure, the tracks lead to an abandoned watchtower, and the fighters in the party engage in combat with the waiting ogre -- again decided by dice-rolling supervised by the GM. Meanwhile, the nimble burglar in the party climbs up the back of the tower, frees the prince from his ropes, and lowers him to the ground -- again, the GM determines how difficult these actions are.
If she wanted a less straightforward plot, the GM might decide that there was no prince -- that the nanny was merely a human or shapechanged accomplice of the ogre, sent to lure unwary adventurers off the road so they could be robbed, killed, and eaten.
Either way, if the GM has chosen the level of difficulty well, the characters will have a good fight and a good test of their skills. They will take a few injuries and be unsure of success, but with some good planning, teamwork, and bravery, will most likely overcome the foe. At the end of the session, the GM sometimes offers rewards: the characters may discover the ogre's treasure hoard in the tower. Based on how well they completed the adventure, the GM may give the players various types of "points", which vary in meaning depending on the game system. Often, they can be used to improve the character before the next adventure, preparing them to face even tougher foes.