Temperature of gases I can't find any law that states this (maybe the combined gas law does and I'm misinterpreting it?), but Feynman said that if you compress a gas, the temperature increases. This makes sense, for example, a diesel engine (or gas engine with insufficient octane or too high a compression ratio). Also, must thinking about a piston "hitting" particles as it is compressed makes sense that energy is imparted.
But he goes on to say that when the gas expands, there is a decrease in temperature. This used to make more sense to me, but the more I think about it, it doesn't at all. Why would the particles lose energy if the container expands?
 A: Just for completeness, when a gas expands its temperature does not necessarily change. The temperature of the gas only changes if it does work on something, for example its container as discussed in Danu's answer. If a gas is expanding into a vacuum it does no work and (to a first approximation) its temperature does not change. This type of expansion is known as a Joule expansion.
I used the qualifier to a first approximation above because the temperature is only guaranteed not to change if the gas is ideal. In real gases there are forces acting between the gas molecules and even in a Joule expansion the gas may do work against these forces and the kinetic energy of the gas molecules and therefore the temperature may change. This is known as the Joule-Thomson effect.
A: Consider a gas in a container. When the container expands, the gas cools down. The crux is in thinking about why the container expands. The reason the container expands is because there are gas particles hitting the walls, pushing them outward: they do work on the walls!
This work on the walls costs them some energy, so that they now have less kinetic energy. The average kinetic energy is proportional to the temperature, so when the kinetic energy goes down, so does the temperature. This, and much more, is all neatly summarized in the ideal gas law:
$$PV=nRT$$
where $R$ is the universal gas constant, $n$ the number moles of particles, and $P$, $V$ and $T$ are the pressure, volume and temperature (in SI units).   
