Answer:
Thermal equilibrium
Step-by-step explanation:
Two systems are said to be in thermal equilibrium when there is no further exchange of thermal energy between them. At thermal equilibrium, these systems possess equal temperature.
Thermal energy is transferred between objects of varying temperatures or between a system and the surrounding. The thermal energy is transferred from the object with higher temperature (hotter) to the one with lower temperature (colder) until a state of equilibrium is attained.
In the case of the coffee and the environment, if the coffee is at higher temperature than the surrounding, it loses heat energy to the surrounding until both of them are now at the same temperature. Conversely, if the coffee has a lower temperature than the surrounding, it gains thermal energy from the surrounding until thermal equilibrium is achieved.