Air rises (or falls) because of a difference in density between it and the
surrounding air - for exactly the same reason that bubbles rise and rocks
sink. Warm air is less dense than cool air; when air is warmed by passing
over heated ground, it expands and becomes less dense. Cooler and therefore
heavier air is able to move in underneath it and force it upward. Warm air,
and bubbles, do not rise because they are pulled upward, rather because they
are pushed upward from underneath.
Compressing a gas forces its molecules closer together; the energy used in
compressing the gas is transferred to the molecules, which results in
heating. Conversely, as a gas is decompressed, it cools as its molecules
move farther apart. Both these phenomena are easy to reproduce - if you've
ever used a manual tire pump, you know how much the pump's cylinder warms up
as you fill your tire. On the other hand, a compressed airflow from a spray
cannister is always cool. Hairspray or spray deodorent, for instance, never
feel warm when they contact your skin.
Depending on the moisture content of rising air, one of two things will
happen: nothing, or condensation. A rising mass of warm, dry air will just
rise. A rising mass of warm, moist air will form cloud. This happens because
as the warm air rises and cools, it is not able to hold as much moisture in
vapor form, and the vapor will condense out as water droplets. When moisture
condenses, it releases heat and tends to make the air packet even less
dense, providing additional buoyancy. In the presence significantly cooler
air, such warm, moist packets result in summer thunderstorms.