The NPC (Non Player Character) is one of the most valuable assets a Dungeon Master can have in a game in my opinion.
A DM can use an NPC in a variety of ways to help them keep the game going.
The NPC can be someone who provides information to the PC's (Player Characters) Like the Sheriff who answers some questions or the bartender who passes on a tip, etc...
An NPC can also be used to fill "in-between" roles such as they are the first ones to get taken down as a way to introduce action coming (like wearing a red shirt on a Star Trek away team). They get in between the PC's and the action, providing an alarm or time buffer, etc.. for the PC's.
An NPC can also be a character that is part of the regular action as a member of the PC's group. They can fight along side the PC's, perform tasks as requested/required by the PC's. Sometimes the DM can use those NPC's as a means to communicate information, warnings, advice, etc.. to the group.
Of course, you have the "static" NPC's in the game who have their one or two things to do as the script requires and the PC's encounter them.
These would be villagers, enemies, etc.. that are planned into the game as it goes along.
Then there are what I call the "drop ins". Just on the roll of a dice or because something has come up that needs the players to pay attention to, NPC's can be inserted into a point of the game just for a brief moment as a wandering monster or a herald from a deity, etc...as the DM rolls it or calls it fit.
Of course, my favorites are my "Guardian Angels". These are NPC's that are full blown characters I have created to go along on adventures with certain groups.
Of course, when I say "guardian angels" I don't mean that necessarily literally.
No, my guardian angels travel through the games as needed, especially for new players who have little to no experience or if there aren't enough PC's to fit what a certain module calls for (say if a module calls for 4 to 8 PC's but there are only 3 PC's in the group at the time, one of my GA's will fill in the spot.
I try to be as fair as I can with handling the GA's. I stay pretty hands off and let the PC's determine how the GA fits in and using their skills by specific request.
The less experienced the players are, the more I will use the GA to make suggestions as to possible actions to take or some ability the GA has that could be of particular use to the group they may not be aware or thinking of. That kind of thing.
The more experienced the players are, the less I offer up on behalf of the GA. As a matter of fact, I have allowed GA's to be nothing more than a typical NPC on a group that is pretty much entirely "used" by the experienced group.
If one of my GA's is not part of the PC group it is not uncommon to have them pop up as a static or drop in or other NPC in a game. They are kind of like my "makers mark" or calling card.
As much as the actual maps and buildings and dungeons and gold and magical items, etc.. are a big part of AD&D, for me, the Non Player Characters are perhaps my best tool, my greatest weapon, etc that I have as a Dungeon Master.