After the main sequence phase of evolution, stars become red giants — a contracting, heating core of helium, surrounded by an energetic hydrogen burning shell, and an extended, cool atmosphere. When the contracting core becomes hot enough to begin fusing helium, the layers above it, all the way out to the atmosphere, readjust again. As a red giant, the star was climbing the red giant branch on the H-R diagram, to the right (cooler, redder) and up (larger). Once the triple-alpha process starts in the core, the core stops contracting and the outer layers of the star "deflate." The core is now fusing helium, and a shell surrounding it is still fusing hydrogen. This brings the star to the left (hotter) and down (smaller) on the H-R diagram. The amount of mass that was lost in the red giant wind will determine where the star ends up on the H-R diagram. It will be located along a line (of constant luminosity) called the horizontal branch.
Just as with hydrogen core, the helium fusing core will eventually use up all its fuel and nuclear reactions will stop. The core will again start to contract, heating up, and outside the core a helium fusing shell will ignite with a hydrogen fusing shell above it. These two energy-producing shells interact in a complex way, turning on and off because of each other. The helium shell's energy can make the hydrogen shell layer expand, cool, and turn off. When the helium shell consumes all its fuel, the hydrogen shell start to fuse again, producing helium ash that falls onto the helium shell and reignites it. With two sources of shell fusion energy, the outer layers of the star will expand even more than before and cool, and the star will move up the H-R diagram in a similar path as the red giant branch. This path is called the asymptotic giant branch, or the AGB.
In addition to the helium, carbon and oxygen produced in the shell fusion zone, there is an important secondary fusion process going on. Stars usually produce heavy elements by combining sets of lighter nuclei when the temperatures are hot enough to overcome the repulsive force of the charged nuclei. There is another way up the ladder of increasingly heavy nuclei, however. A few nuclear reactions in the fusion shells produce free neutrons which have no charge. This means that neutrons can be added to charged nuclei to build higher mass nuclei at temperatures that are too cool for carbon, oxygen, or heavier nuclei to combine with each other. In AGB stars, the neutrons are produced at a moderate rate and this fusion is called the slow, or s-process. We think that the s-process is responsible for producing many elements heavier than iron, albeit in very small amounts. The amount of s-process material that is created is very sensitive to temperature, density, composition, and how many neutrons are available. Astronomers who make models of how stars evolve like processes like this because they provides very strong constraints on the models. Imagine you work at a shipping company and have two boxes that have no return addresses but need to be returned to their place of origin. One box is made of cardboard that is available all over the world, and the other box is made of a rare wood that grows only in a few places on Earth. For which box would it be easier to pinpoint a return address? In a similar way, rare, hard to make elements provide good clues for astronomers studying the evolution of stars.
Mass loss is more vigorous in the asymptotic giant branch phase than while the star was a red giant. The irregular interaction between the hydrogen and helium fusion shells leads to pulsation in the atmosphere and considerable mixing of material from deep inside the star with the atmosphere. This is a productive time in the star's life — dust may be made in the regions surrounding the star, and the pulsation and mixing expel most of the outer layers of the star (enriched in s-process nuclei) into interstellar space. Some of the most beautiful objects in the night sky are formed as this stage ends.