Setting refers to when and where a story takes place, and what’s going on in society that influences the characters.
Like every element of your writing, your setting has two jobs: to advance the plot or provide insight into the characters.
Unless your plot could take place anywhere, your work will be much better if you make your setting as interesting and important as any human character. There’s a reason it’s Sex and the City, not Sex in the City. The physical infrastructure and pulsing energy of New York are present in nearly every scene, making the landscape a character that drives the plot and give insight into the other characters.
One way to think about setting as character is to tap into the Jungian archetypes (patterns and images that derive from the collective unconscious) that are found in a place.
A few examples:
Forests. Forests are wild, dense and dark, beyond the reach of civilized society. They often represent the unknown, and thus are great settings for scenes of transformation as your character “wanders in the wilderness.”
Possible substitutions: a city, a prison, an inner-city school, or even a nursing home.
Gardens. Unlike the forest, every aspect of a garden is overseen by humans, usually with the goal of creating beauty. They are perfect for scenes of retreat and contemplation, where your character sorts out something in a setting of safety and carefully curated opulence. (Gardens also can represent longing or nostalgia for the lost Garden of Eden.)
Possible substitutions: a museum, a high-end retail store, a high-end hotel.
Mountains. Mountains can be dangerous and difficult to climb, but reaching the top gives your character the chance to see clearly in all directions. Mountains also are often associated with a higher, supernatural power, so that characters have additional wisdom and insight when they return.
Possible substitutions: a university (the “ivory tower”), a skyscraper.
Caves or tunnels. While these, like forests, also represent the unknown, they usually provide a much more singular and focused experience. The entrance typically is also the exit, and there are few predators. Alone and hidden, characters can (or must) face their deepest fears, and emerge with greater self-knowledge and direction.
Possible substitutions: a car, a ship, a hotel room, an office, a hallway, a lonely highway.
Water. A lake (or calm water) can represent contemplation or repose (or to its extreme, stagnation), while the vastness and power of the ocean represent alienation, danger, and nature’s dominion over humans. Crossing a river can signify the conclusion of the previous way of being and the beginning of a new way of being or adventure (and the river itself often signifies the passing of time).
Possible substitutions: a church (lake), a corporation (ocean), a venue where a rite of passage is held, such as a wedding ceremony or graduation (river).
A setting that reflects what the character is thinking and experiencing will give readers much greater insight into the plot and empathy for your characters.