A system is part of the universe wich becomes the attention of an observation. While the environment is other part of the universe which is separated from the system. Examples of a system we can see in daily life is helium gas cylinder and ga balloon.
If we are only observing the helium gas tube, than the tube becomes the boundary between, the system and its outside emviroment.
Otherwise if we are only observing the balloon, then the surface of the balloon becomes the boundary between the system and its outside environment.
Work is the amount of energy transferred from the system to its environment o vice versa.
Heat is the amount of energy transferred from the system to its environment resulting from the temperature difference.
Internal energy is the sum of the kinetic and potential energies of all the atoms or moleculs of substance.
Work Heat Internal energy
Since it is microscopic, than what we can observe macroscopically is the conversion of the internal energy ΔU of the substance. If the system changes from initial state U1 into final state U2, then the change of internal energy is :