I am not talking about the monsters and villains the characters will be fighting, though some of my points could apply to them as well.
Back in the day the level of an NPC was static. The level was determined by the location of where they were from and what seemed most appropriate. Guardsmen in a city were a higher level than those for a village. It made more sense that way, as a city had a higher number of available guardsmen so logically it made sense those of a higher level would be made guardsmen. In addition, guardsmen in a city had to deal with higher level threats and thus could be expected to be of a level high enough to deal with them (excluding the threats only a PC hero could handle).
Soon thereafter problems began to arise. Eventually characters would rise in level beyond the capabilities of the guardsmen (and by extension the DM) to control them. Player characters could ride rough-shod over a city with no fear of consequences. There was no challenge left. The levels of the static NPC began to rise or even fluctuate to meet the needs of a game. It soon became acceptable to alter the level of static NPCs to provide the player characters with a challenge.
Part of the new modern day philosophy is that encounters should be designed with the level of the characters in mind, to better provide them a challenge. NPCs now run a gamut from low to high level depending on what is needed for an encounter. One set of guardsmen will be level 1, but later in a campaign they will be level 25.
This is also to keep things “fair”. Player characters are not expected to be able to handle a higher level encounter and thus one is not presented to them.
I am all for keeping things “fair” and for presenting players encounters they are capable of handling. That does not mean there is no place for encounters that fall below or above a group’s capabilities. In fact to keep things “realistic” you want to put in such encounters. The trick is to not run the encounter as you would run an even level encounter.
Below the PCs Level
This situation occurs when the player characters return to a location they have previously visited, one in which they have gained quite a few levels since they were last there. An encounter run here is often without challenge as they can easily handle whatever the locals throw at them.
While it is possible to upgrade the level of the NPCs, I would recommend against this. First, because it artificially inflates the world around the players. If everyone advances at the same pace as the characters, then what real advancement do the characters make? By keeping the NPCs at or near their same initial level the players have a steady measuring stick of how far they have progressed. Going back to where they came from, allows them to see how far they have come.
Avoid running encounters when the NPCs are far below the characters. Take it to narration describing the encounter but avoid actually rolling dice.
“It was a short battle wherein the guardsmen didn’t stand a chance. Near the end a couple of the guards run in fear, but you easily bring them down as well.”
“A second set of guards catch sight of you, but apparently they have heard what you are capable of doing and avoid eye contact, quickly moving away.”
An alternative is to run one encounter as a straight, normal combat, so the players can readily see how far their characters have progressed. However, I wouldn’t do this more than once as it will quickly become tedious.
Above the PCs Level
If the characters are in an area that by default is above their appropriate level, there are a couple of different things you can do.
Again, taking it to narration is a good option.
“The beast comes tearing through the woods knocking trees over with one swing. An unbidden chill runs through your spine as it passes. Part of you knows you could not survive a fight with this beast; at least not at your current level of experience. It’s a good thing it seems to have not noticed you.”
Showing how the monster works is another tactic for letting the player’s know they are in an area beyond their depth. This consists of the characters seeing the monster handily destroy another NPC of higher or equal level to the characters.
If you want to run an encounter anyway, it is recommended you provide an easily recognizable and usable escape mechanism. You don’t need to do this for encounters wherein the characters have a chance of success, but rather for those encounters where the monster is more of a story element than a combat element.
Keeping Pace with the PCs
If you are planning running a long term campaign in a central locale, you will want encounters you can run that are of an even level with the player characters. The trick to this is forethought and planning.
It makes little sense for the players to be fighting the same type of guardsmen at level 1 as at level 25. The thing to do is present the players with a series of guardsmen. At level 1 they will encounter Militiamen. The Regular Guard will be level 10 and if the players run into the Regular Guard they know they need to run. At level 20 they will encounter the King’s Red Guard. The key is to let the players know of the existence of the higher level NPCs before they meet them. That way it will come as no surprise and will make more sense when they encounter them at a higher level.
It is possible to have the levels of your NPCs be “realistic” while at the same time providing for interesting encounters. It just takes a little long-term planning. It is also ok to run encounters outside the player character’s levels as narrative. If die-rolling is a forgone conclusion its best to not roll dice.