science bro
The tl;dr and slightly oversimplified version is that it's basically an illusion based around how your body senses temperature.
Temperature isn't energy, temperature is the manifestation of energy transfer. It's that molecular motion whacking against another object and transferring heat/motion that way. So the rate of transfer, which is affected by heat capacity among other things (stick your hand in 100 degree water vs 100 degree air and see the difference), is what governs temperature and what we feel as hot or cold. If the body absorbs energy, we sense it as "hot". If it loses energy, we sense it as "cold". How we perceive it is based around that, which is also affected by how cold our extremities are. It's perfectly possible for something to feel warm on one part of your body and cold on another.
And there are some cool tricks you can play on your nervous system by putting hot and cold regions very close to each other. Your brain freaks out and thinks its scalding.
This may also be of interest: https://what-if.xkcd.com/71/