If the star is much larger than our sun, then once these stars run out of hydrogen, they leave the main sequence stage and expand into red supergiants. Once again, helium nuclei fuse together to produce heavier elements. At some point, the red supergiant stops carrying out nuclear fusion. At this stage, the star explodes and this is called a supernova.