Everything that is born must die. Not only living beings, but inanimate objects like stars too.
The birth of a star
The universe has massive clouds of hydrogen floating around. Sometimes, these clouds come together and form very dense and huge balls of hydrogen gas. As the clouds come close, their temperature increases. This is called a proto-star (original star).
The increase in temperature triggers off nuclear reactions at the core of the star. Nuclear reactions inside the star occur when the nucleus of two hydrogen atoms fuse to produce a helium atom. This reaction which is actually the same as that inside a hydrogen bomb, release huge amounts of heat and light. This is what makes a star glow.
Our sun is also a star and the heat and light we see is actually the burning of the hydrogen fuel in its heart.
Like all things that are born, a star also dies. It dies when it runs out of fuel. It is a little like a car without petrol. But, the petrol tank in a car can be refilled. The star usually does not get a refill. And the death of a star is much more dramatic than a car without petrol.
How will our sun die?
Once the hydrogen inside the sun’s core is used up, the sun will expand rapidly. It will grow and grow till it reaches the earth’s orbit. And by then, it will be so hot, that it will consume the earth too.
Such a huge star is called a red giant. Our sun will eventually become a red giant star some 5 billion years from now. And this will be the beginning of the final stages of its death. Slowly, the outer surface of the red giant will dissipate leaving behind a tiny, white and shimmering core called the white dwarf star.
As the white dwarf star cools down, it will reach the final stage of its evolution and become a cold and inert heavenly object. This is often called the black dwarf and will be the final stage in the life of our sun.
Whenever something dies, it creates something new. The death of the sun will create new substances which will form newer stars and newer planets. The entire universe is actually made of the ashes of dead stars.