which processes in water cool off the surroundings and which heat up the surroundings
The energy that is lost by the coffee and the mug is being transferred to the colder surroundings. We refer to this transfer of energy from the coffee and the mug to the surrounding air and countertop as heat. In this sense, heat is simply the transfer of energy from a hot object to a colder object.