thermodynamic system
A thermodynamic system is simply the particular piece of the universe you have decided to study — the gas inside a cylinder, the water in a kettle, the air in a balloon, or the coffee in your cup. Everything else — the room, the table, the rest of the world — is called the surroundings. The imaginary or real surface that separates the two is the boundary. Drawing this boundary is the very first move in thermodynamics: you fence off the part you care about and then keep careful track of the energy that crosses the fence.
More precisely, we classify systems by what is allowed to cross the boundary. An open system can exchange both energy and matter with its surroundings (a boiling open pot loses both steam and heat). A closed system can exchange energy but not matter (sealed gas in a cylinder that can still be heated or pushed). An isolated system exchanges neither energy nor matter with the outside (an idealized perfect thermos). The state of a simple system is pinned down by a few large-scale variables such as pressure P, volume V, and temperature T.
Choosing the system wisely is a skill, not a formula, and the same physical setup can be sliced in different ways depending on the question. One honest caution: a truly isolated system is an idealization — no real container blocks heat completely — but it is an enormously useful one, because it lets us state conservation laws cleanly and then add the small leaks back in as corrections.
Consider a gas sealed in a cylinder fitted with a movable piston. The gas is the system; the cylinder walls, piston, and everything outside are the surroundings. Heat the cylinder from below and energy crosses the boundary as heat; if the gas then pushes the piston up, energy leaves across the boundary as work.
The system is what you choose to study; the surroundings are everything else.
The system, surroundings, and boundary are choices you make, not facts of nature — but once you fix them you must stay consistent, especially about the sign of energy entering versus leaving.