The old idea was that heat was a substance and flowed from place to place as it was wont to do, but "never from a hotter body to a colder body." This caloric theory of heat is not correct in that caloric does not exist. The theory does go a long way in explaining the concept of heat, however, and it gives correct answers. Therefore, if we think of heat as a "substance" we will have a reasonable intuitive understanding. We understand heat, on a microscopic level, as "stored" in the translations, vibrations, and rotations of molecules when these degrees of freedom can exist. The "flow" of heat from one substance to another placed in thermal contact we immagine as the transfer of these "energy" from these degrees of freedom in one body to those in the other body. Classical thermodynamics which governs our understanding of this is an equilibrium theory. Thus, we start from an initial state of two substances at equilibrium, place them in thermal contact and allow enough time so that equilibrium is established for the final state. This final state consists of the two substances in thermal equilibrium with each other and characterized by the same temperature. The final temperature of the two bodies depends on their initial temperatures and their heat capacities. What is the heat capacity of the atmosphere at the altitude flown by the space shuttle (at 300Km)?
What then about temperature? Temperature is that which is measured by a thermometer. If we put a thermometer into a liter of water, allow equilibrium to be established, and record a reading and then take half of that liter we still obtain the same reading. Temperature is something apparently that does not depend on the amound of stuff we have. This is different than the idea of caloric, or more properly, heat. We can have more or less of it. The author in the reference cited below critizes this idea, but that author is not quite right. It is claimed, in the reference below, "that people tend also to reason that different sensations mean different temperature.." and "that many think that heating a substance always means increasing its temperature."
There is another concept we have mentioned; that of thermal equilibrium. What is meant by thermal equilibrium? Since the sun is the source of energy in the atmosphere and atmospheric heating is due to the absorption of solar radiation by molecules what happens when those molecules are on the opposite side of the earth (in the dark)? Is there equilibrium in the atmosphere and how does equilibrium if it exists change with altitude?
A Reference to a Paper on Missunderstandings about Temperature And Heat