Red Giants and the Horizontal Branch
When stars of moderate mass start to exhaust the amount of hydrogen in their core, the core has to heat up to keep the fusion rate high enough to balance the pressure of the gas above it. As the core begins to exhaust all its hydrogen, burning ignites in a shell above the core of helium ash. This causes the overall luminosity, or brightness, of the star to increase, the overlying volume to expand, and the atmosphere of the star to cool - the star ascends the so called red giant branch, becoming brighter, cooler (and consequently) redder.
Many find this intuitive, but there is one strange thing - why should the interior of the star becoming hotter make the exterior cooler? Our friend the virial theorem, which says that 2K+U = 0, where K is the kinetic energy and U is the gravitational potential energy, might have something to say. The interior getting hotter, and the star consequently expanding, increases both K and U, since U becomes less negative. Consequently K for the outer regions of the star must decrease, by cooling, in order to keep the sum = 0.
Once the interior of the star become hot enough to ignite helium (about 10^8 K), burning it to carbon by the triple alpha process, the exterior shrinks and warms and the star dims moving to the so-called horizontal branch (because it's path on the Hertzsprung-Russell diagram is almost horizontal). Why so? Again, listen to the virial theorem. Helium burning expands the core, due in part to radiation pressure, so its gravitational potential energy decreases. Consequently, the rest of the star must contract and heat up to compensate.