Stars spend most of their lifetime on the main sequence, a time when stars are in hydrostatic equilibrium and are fusing hydrogen into helium in their cores. The main sequence can be seen on the diagram in blue. The orange dot indicates about where our Sun lies on the main sequence. Something to note about the main sequence is that higher mass stars exist on the upper part of the main sequence, whereas lower mass stars exist on the lower part of the main sequence. So, as one goes upward and to the left on the main sequence, the stars will increase in mass.
After stars fuse all of the hydrogen in their core to helium, their cores will begin to contract due to the cores' own gravity as well as there not being any fusion process to counteract gravity. Also at this point, hydrogen fusion will begin to occur in the stars' outer layers, causing these layers to expand, cool, and redden. By this point, the stars have evolved off of the main sequence and are becoming red giant stars. For the lowest mass stars, hydrogen fusion will be the only fusion process they will ever experience. However, for intermediate and high mass stars, their cores will go through more fusion processes. For an intermediate mass star, after the helium core has contracted enough and has attained high enough temperatures, the star will begin to fuse helium into carbon. This stable fusion process lasts for a shorter time than the main sequence did, and once it ends, the star's core will again contract, with the outer layers again expanding, bringing the star into the supergiant region of the HR diagram. The red giant and supergiant regions of the HR diagram can be seen on the above diagram in red. Now, for intermediate mass stars, this is the final stage of evolution. Eventually, the outer layers of the star will expand completely off of the star, leaving what is known as a white dwarf star behind. White dwarf stars are very dense core remnants of dead stars that are slowly radiating away their energy. The white dwarf stars are located in the HR diagram in the white region.
A high mass star will also fuse helium
into carbon, but because of the star's high mass, the core will be
massive enough to contract to the point where other stages of fusion
are possible. A high mass star will go through many different stable
fusion processes, fusing heavier and heavier elements, traversing the
HR diagram along the top of the diagram and horizontally through the
red giant/supergiant region as it goes through these processes.
Eventually, the core of the high mass star will become primarily
iron. It is physically impossible to fuse iron and get energy from
the process. It actually takes energy to fuse iron. Therefore, once
the core has become iron, the star will not be able to fuse anything
else. The core will collapse under its own gravity, and a shockwave
will be sent out through the star, violently exploding the outer layers of the
star off in what is known as a Type II supernova. The fate of the
remaining core of the star depends on its mass. If the core is less
than about three solar masses, the star will collapse into a neutron
star, a star even more dense than a white dwarf. The neutron stars
are indicated on the HR diagram in the shaded region. However, if the
remaining core is greater than about three solar masses, the core will
collapse to a black hole.