Everything that is not 0 Kelvin radiates electromagnetic energy. In vacuum, this is the only relevant form of heat transfer. The hotter you are, the more you energy you radiate (I believe the relevant equation is given here).
The question whether you cool off or heat up in space depends on whether you absorbs more electromagnetic radiation than you give away. So, for instance, if you are orbiting Earth in plain sunlight, you may actually warm up, because there is lot of electromagnetic energy coming from the sun (much of it as visible light).
But if you are in the shadow of the Earth, the amount of energy that comes from night side of Earth and the general direction of the outer space is very low compared the the amount of energy you radiate away at 37ºC, so you cool off and eventually freeze.