In a narrative, the term for the time and place in which the story occurs is setting.
Setting establishes where and when events happen, but it can also include the surrounding social, cultural, historical, and environmental conditions. A story set in Victorian London, for example, has a setting shaped not only by streets and buildings but also by the period’s technology, class structure, and customs.
Setting can influence characters and plot rather than merely provide scenery. A remote island may create isolation, while a wartime city may force characters to make different choices. It can also help create mood: a stormy house may feel threatening, although mood and setting are not the same thing.
Readers sometimes confuse setting with plot, theme, or mood. Plot is the sequence of events; theme is the underlying idea; mood is the emotional atmosphere. Setting is the narrative environment in which those elements operate. In fantasy and science fiction, setting may expand into detailed worldbuilding involving invented histories, cultures, planets, or political systems.