Hot coffee in a mug cools over time and the mug warms up. How would you describe the energy in this system?
The hot coffee transfers heat out from itself into the mug so that the mug warms up. This is driven by entropy, a measure of energy dispersal.
For a certain time frame (in which the energy has not yet fully seeped out of both the coffee and the mug into the surrounding air), once the coffee and mug temperatures match, the energy in the system (the hot coffee) has equilibrated with the energy in the (immediate) surroundings (the mug).
For this time frame then, we can then say that the thermal energy in the coffee has come into thermal equilibrium with the thermal energy in the mug.
Of course, with time, the thermal energy that came from the hot coffee will have dispersed into the surroundings (outside the mug), and eventually, the mug will cool down to match the temperature of the surroundings.
In general, the surroundings are much bigger, so the change in temperature for it will typically be negligible.