A system in thermodynamics refers to that part of universe in which observations are made and remaining universe constitutes the surroundings. The surroundings include everything other than the system.
System and the surroundings together constitute the universe .
The universe = The system + The surroundings However, the entire universe other than the system is not affected by the changes taking place in the system.
Therefore, for all practical purposes, the surroundings are that portion of the remaining universe which can interact with the system. Usually, the region of space in the neighbourhood of the system constitutes its surroundings.
For example, if we are studying the reaction between two substances A and B kept in a beaker, the beaker containing the reaction mixture is the system and the room where the beaker is kept is the surroundings.
Note that the system may be defined by physical boundaries, like beaker or test tube, or the system may simply be defined by a set of Cartesian coordinates specifying a particular volume in space.
It is necessary to think of the system as separated from the surroundings by some sort of wall which may be real or imaginary. The wall that separates the system from the surroundings is called boundary.
This is designed to allow us to control and keep track of all movements of matter and energy in or out of the system.