The Hertzsprung-Russell diagram shows the relationship between a star's temperature and its luminosity. It is also often called the H-R diagram or colour-magnitude diagram. The chart was created by Ejnar Hertzsprung and Henry Norris Russell in about 1910. It is a very useful graph because it can be used to chart the life cycle of a star.
We plot stars' surface temperatures in degrees Kelvin on the x-axis (horizontal axis). We plot stars' luminosity (or absolute magnitude) along the y-axis (vertical axis). Be aware that the x-axis of the H-R diagram can use different data. It can show the star's temperature, its spectral class (OBAFGKM), or its colour. All these types of data show the same relationship with a star's luminosity.
Most stars, including the Sun, plot in a band which runs from the top-left to the bottom-right of the chart. This band contains stars which are in their main sequence stage. We can use the chart to see the temperature of main sequence stars increases with brightness. This is because the star's mass controls both its temperature and brightness.
Giant and supergiant stars plot to the top and top-right of the diagram. This tells us they are brighter than main sequence stars but also redder and cooler. This is because they expand and cool as they reach the final stages of their lives. However, because of their large size, they remain very bright.
White dwarf stars plot below and to the left of the main sequence. This tells us they are hotter than main sequence stars, but not as bright. This is because they are small in size but contain a lot of mass.
Stars tend to spend most of their life (~90 %) in the main sequence stage. After this they evolve into a giant star for the remaining 10 % of their lives. Finally, they will either explode as a supernova or become a white dwarf.