Way back in 1792, Pierre Prévost put forward the theory of radiation in a systematic way now known as the theory of exchange. According to this theory, all bodies radiate thermal radiation at all temperatures. The amount of thermal radiation radiated per unit time depends on the nature of the emitting surface, its area and its temperature. The rate is faster at higher temperatures. Besides, a body also absorbs part of the thermal radiation emitted by the surrounding bodies when this radiation falls on it. If a body radiates more than what it absorbs, its temperature falls. If a body radiates less than what it absorbs, its temperature rises.
Now, consider a body kept in a room for a long time. One finds that the temperature of the body remains constant and is equal to the room temperature. The body is still radiating thermal radiation. But it is also absorbing part of the radiation emitted by the surrounding objects, walls, etc. We thus conclude that when the temperature of a body is equal to the temperature of its surroundings, it radiates at the same rate as it absorbs. If we place a hotter body in the room, it radiates at a faster rate than the rate at which it absorbs. Thus, the body suffers a net loss of thermal energy in any given time and its temperature decreases. Similarly, if a colder body is kept in a warm surrounding, it radiates less to the surrounding than what it absorbs from the surrounding. Consequently, there is a net increase in the thermal energy energy of the body and the
temperature rises.