A glass of water at room temperature and a hot mug of coffee are placed on two tables inside a closed room. As the coffee cools down, what would happen to the temperature of the water?
The water gets slightly warmer after taking heat from the surrounding air.
Let us assume the room is perfectly closed and no heat is being gained from or lost to the environment outside.
Here we have three bodies thermally interacting inside the room - the glass of water (initially at room temperature of 23 degree Celsius), the air in the room, and the hot mug of coffee.
As the coffee cools down, it slightly increases the hotness of the air in the room. Thus, the room temperature itself increases after some time. This means the glass of water is now slightly cooler than the air around it.
Due to this temperature difference, the water will get slightly warmer until it has the same temperature as the air through which exchange of heat occur.