Well, the basic law of thermodynamics tells you that the heat flows from the hotter object to the colder one. But what this means in a given situation will depend on the precise mechanism of that heat flow, i.e. elementary interaction that makes it possible.
So let's discuss few of them and see where it takes us.
First, there's the usual conductive heat transfer. This is mediated by the collisions of the touching materials (and even more macroscopically by an electromagnetic force. Obviously, this effect is irrelevant in the vacuum.
Second, there's evaporation. Even if you have a perfect crystal that is very stable, there's a possibility that a large fluctuation will occur and one of its molecules will be "kicked out" of it and set flying into the empty space. Because the molecule needs to have a (lot) higher energy than the rest of the molecules around it to be able to get free from the crystal, the average remaining energy and therefore also the temperature will decrease. But this effect is more relevant for non-crystals (because the molecules are much less tightly bound). E.g. if water were put into the free space it would freeze by evaporation very quickly.
Last, but not least, radiation. Any object at non-zero temperature will have lots of its constituents in excited energy states and there will be a non-zero probability for returning to a lower energy state and emission of a photon. In more simple terms, kinetic energy is converted to an electromagnetic energy. This effect is most relevant for black objects which absorb all the radiation (an ideal form of which is called black body) and least relevant for white objects which reflect everything (note that the terms black and white are to be considered here in generalized sense, not just pertaining to visible light).
Well, these effects are most important for the usual matter. But there is also the dark matter which doesn't interact electromagnetically (therefore the name), so it wouldn't cool by photonic radiation (but might cool by emission of other particles with which it interacts). In conclusion, the heat transfer depends very much on the precise microscopic interaction that the given object is able to undergo.