I was not. I was referring to the DM. I usually use "she" for that (since DMs "traditionally" are men, this makes it stand out), but I chose to use the completely gender-neutral term instead.
Okay. Then to clarify: How did you establish NPCs and factions and history of the world? How did you "have a general knowledge" of these things? How do you make these things up on the fly? I am only asking three questions to point to the "okay, you have this knowledge. How do you have it?" I don't expect individual answers to each question.
For my main campaign setting the history of the world has grown over time. Long ago in a century far, far away I came up with a basic structure. A lost golden age, long age of darkness, the "modern" period of about a thousand years. That way I had forgotten gods, artifacts that can't be recreated, the occasional truly ancient dungeon. I have a calendar that covers big events for the past thousand or so years with major events, I occasionally add to this. Then comes the history of campaigns which I make note of major events. I also have a list of regions, major events, cities, anything from a few lines about the region to a few paragraphs.
After reviewing notes on the history of the region I came up with factions and ideas I thought would be interesting and give me options for games at different levels of play. Political structures vary but there will always be power brokers with some good, some evil, most pretty neutral. I develop a very high level list of important people with more detail added to NPCs that will be in the sphere of influence of the characters. Same with obstacles and opportunities. I sketch out a few very high level things, mostly focus on options for the character's current sphere of influence.
What I am not doing is planning out specific story arcs or exactly what faction will do what when. I know what their goals are but things change as the campaign proceeds things change and are adjusted based on player decisions and interests.
As far as making things up on the fly, I know where the NPC's heads are at. While I've never really analyzed it, there are only so many NPC tropes. There's the scoundrel who's deep down a decent fellow, the idealistic kid who's a bit delusional, the aging wise man perhaps a bit tired of it all but can act as mentor/sponsor. Then there's the villains, the obedient lackey the heroes run from early on, the mysterious evil politician lurking in the background. Throw in some comic relief like the cowardly non combatant and his sidekick who secretly knows more than they let on and can only speak in whistles and beeps but everybody still understands them. Typical stuff.
Okay. How do you make those decisions? What makes some decisions more likely and others less likely, beyond just "context"--e.g., what is your decision-process for taking inputs from context and turning them into behavior outputs?
It's always my decisions, sometimes I roll dice if I'm uncertain. It's grounded in lore that's been established and follows from faction or individual goals and morality. Quite frequently I'll review high level notes that haven't been established as fact and think about how things may have to be adjusted based on campaign events. I try to make NPCs as consistent as possible, even if that means that the secret spy continues to pretend to be an ally and some behavior may seem to be erratic because of things the players don't know yet.
How do you generate such "high-level ideas of" various things?
Okay. This now leads to an incredibly important distinction: How would you know whether a GM was doing that or not? If vast, vast swathes of the world are hidden in the black box--the history of the world is mostly unknown to the players, the factions are only superficially known, locations, emotions, politics, etc., etc., etc., so much is kept inside the black box of your notes--how can you tell the difference between someone who's really good at improvising on the fly, and someone who's simply pretty decent at having notes and not wildly breaking from them?
Sometimes you can tell, sometimes you can't. When I can tell that people are just making things up on the fly it shows up as every single NPC being incredibly shallow, there being inconsistencies in story or NPCs do things simply to move the plot along. My wife and I occasionally complain about decisions made by characters on TV shows that make no sense for the established characteristics previously portrayed, things that happen because the plot demands it. If NPCs do things because the plot demands it, it's usually pretty obvious.
Long term though I don't see why it matters. If the world feels like it's responding to our actions, if NPCs are consistently portrayed (or when they aren't consistent there's a good reason), if the world is interesting and engaging I don't care how the sausage was made. The real world is a black box and all I see is the results so I don't see why I would expect anything different in a fantasy world.