By removing the energy.
This is either by pumping it away, like in a fridge or air conditioner, or introducing it to something with less energy than it, like an ice cube.
Differences in temperature want to equalize, so sticking something cold with less energy and something hot with more energy, the heat energy will flow into the cold thing with less energy until everything has the same amount.
Latest Answers