In order to avoid confusion, scientists discuss thermodynamic values in reference to a system and its surroundings. Everything that is not a part of the system constitutes its surroundings. The system and surroundings are separated by a boundary. For example, if the system is one mole of a gas in a container, then the boundary is simply the inner wall of the container itself. Everything outside of the boundary is considered the surroundings, which would include the container itself.
The boundary must be clearly defined, so one can clearly say whether a given part of the world is in the system or in the surroundings. If matter is not able to pass across the boundary, then the system is said to be closed; otherwise, it is open. A closed system may still exchange energy with the surroundings unless the system is an isolated one, in which case neither matter nor energy can pass across the boundary.