Stars spend the vast majority of their lives on what is known as the main sequence. Here they convert hydrogen into helium, mostly through the fusion process of the proton-proton chain. However, once this fuel has been depleted, the core will begin to contract.
As the core is collapsing the temperature is rapidly increasing. The resulting energy propagates from the core, pushing the outer envelope of the star outward. The star is now dramatically larger, and has become a red giant.
Properties of a Red Giant
Even if the star is a different color, say yellow like our Sun, the resulting giant star will be red. This is because as a star increases in size the average surface temperature decreases. According to Wien's law, the peak wavelength (color) will be determined by the temperature with cooler stars emitting most strongly in red, while the hottest stars will burn blue.
The red giant phase comes to an end once the core temperature reaches high enough that helium begins fusing into carbon and oxygen, resulting the in star shrinking in size (though not as small as it was on the main sequence) and becoming a yellow giant.
Not Everyone Gets to be a Giant
Not all stars will become red giants however. Only stars will with masses between about half and six times the mass of our Sun will eventually evolve into red giants.
Smaller stars do not have a radiative zone, but instead transfer energy from the core to the surface by a lone convection zone. The result is that helium produced by the fusion process in the core is redistributed through out the star, meaning that there is no possibility for this to be used for a further fusion process.
Additionally, because of their smaller size, the core temperature will be rise high enough to ignite helium fusion, and it is unclear that the evolutionary path for these stars is once they have exhausted the hydrogen fuel.
Usually, we ascertain the fate of stars by studying them at different evolutionary states and mapping out the probable life cycles. This was initially done by using Hertzsprung-Russell diagrams. Then, of course, these life cycles are compared to theoretical models of the physical interactions and mechanisms of the star to explain the evolution.
However, the smaller a star is the longer that it lives on the main sequence. And stars smaller than about a third of our Sun's mass would have lifetimes greater than the current age of the Universe.
Therefore it is not possible for us to observe what results once such a star has left the main sequence.
Low and medium mass stars, like our Sun, which follow the path described above will eventually evolve into a planetary nebula.
During the conversion of the core from helium to carbon and oxygen the star is highly volatile. even small changes in core temperature will have a dramatic effect on the rate of nuclear fusion.
Should the core temperature get too high, either by random dynamics in the core, or because of the amount of helium that has been fused, the runaway fusion rate that results will once again push the outer envelope of the star out into the interstellar medium creating another red giant; this one of even greater size than before.
However, because of the ever increasing core temperature at this juncture, and the fact that the star has become so large that the other layers have been gravitationally unbounded, the star begins to fade into the interstellar medium, creating a planetary nebula.
Eventually the outer envelope of the star will lose its energy and begin to fade, leaving behind only the core of carbon and oxygen. Fusion has ceased and the object, known as a white dwarf - still smoldering from the previous ordeal - will cool over time.
Eventually, the glow from the white dwarf will also fade, and there will only be a cool, dim ball of carbon and oxygen left behind.
High Mass Stars
Larger stars do not enter a normal red giant phase, but instead, as heavier and heavier elements are fused in their cores (up to iron) the star oscillates between various supergiant star phases, including the related red supergiant.
Eventually, these stars will exhaust all of the nuclear fuel in their cores. (The fusion of iron is an endothermic process, meaning that instead of providing outward radiation pressure needed to balance the in warded gravitational force, it takes more energy than it produces. This ceases the fusion and causes the core to collapse.)