Consider a tiny "parcel" of air in the middle of the tube. As the tube resonates, the parcel moves back and forth a little bit, and it gets squeezed and stretched a little bit -- it has both pressure and velocity components. The key is that when the parcel gets squeezed, it gets a little bit hotter -- and then when it stretches out, it gets a little bit cooler. Furthermore, because the parcel is moving, the place where it's hottest is a little towards the closed end, and the place where it's coolest is a little towards the open end.
Figure 2.
This page maintained by Wil Howitt