When a system changes, energy is transferred. It can be transferred into or away from the system, between objects in the system or between different types of energy stores.
Closed systems are systems where neither matter nor energy can enter or leave. The overall change in the total energy of a closed system is always 0.