But to give some context, you first need to understand heat as scientists do: a measure of how wiggly atoms are. Hot things move quickly, cold things very slowly. If atoms come to a complete stop, they are at absolute zero. Space is just above that, at an average temperature of 2.7 Kelvin (about minus 455 degrees Fahrenheit).
But space is mostly full of, well, empty space. It can’t move at all. It’s the very diffuse gases and grains that drift through the cosmos whose temperature we can measure. Sunlight and starlight might heat those atoms up if they pass by, but eventually they’ll cool back down by radiating heat, and that heat will simply fly out into space, with little chance of hitting (and therefore heating) anything else in that vast emptiness.
Read more: What Does Absolute Zero Mean?
On Earth, you lose most of your heat by conduction: the atoms in your body bump into atoms of air or water, passing on that energy. Nature wants to equilibrate (where everything wiggles at the same speed), so if you’re warmer than your surroundings, you’ll lose heat. If you’re a lot warmer than your surroundings (say, you’ve fallen into an icy river) you will lose heat much faster than your body makes it.
In space, there is no air or water, so the only way to lose heat is by radiation, where your warm and wiggly atoms release energy directly into space. This is a slow process, so you’d die of oxygen deprivation long before you’d notice the cold!