The stars, which are much heavier than the sun, end up in a catastrophic way resulting in big explosions. When a very big star is in the red-giant phase, then being big, its core contains much more helium. This big core made up of helium continues to contract under the action of gravity producing higher and higher temperatures. At this extremely high temperature, fusion of helium into carbon takes place in the core and lot energy is produced.

Since the star was very big and contained enormous nuclear fuel helium, so a tremendous amount of nuclear energy is produced vary rapidly which causes the outer shell of this red giant star to explode with brilliant flash like nuclear bomb. This type of exploding star is called supernova. When a supernova explosion takes place, then clouds of gases in the envelope of red-giant star are liberated into the space. The heavy core left behind after the supernova explosion continues to contract and ultimately becomes a neutron star.