A cataclysmic explosion of a star is called Supernova. Hold on a minute, it's not just the end but it's the new beginning of everything - you are living on Earth because of a Supernova.
The planets of our Sun and everything including us contain matter that was blasted into space by an exploding Supernova long time ago.
Star's Fate Depends on its Mass
The death of a star depends on its mass. When our Sun runs out of fuel, it will be converted to a red giant and cools down to a white dwarf because it does not have enough mass to explode as a supernova.
If the star's core has mass less than 1.4 times the mass of the Sun, at the end of its life (at no more nuclear fuel), it cools down and end as a white dwarf. The start's core collapses further if the star's mass is more than 1.4 times the mass of the Sun and what remains is a neutron star whose mass is compressed to a radius of 10km (even a teaspoon of this material can weigh billion tons).
And what is more interesting is if a star's core has mass more than three times the mass of the Sun, the collapse continues further until it is turned into a very small dense material in space called black hole.
The gravitational force applies inward pressure to keep the star compact. The heat produced by nuclear reactions at the star's core generate outward pressure which helps the star stay safe from collapsing.
At the end of a star's life the star runs out of its nuclear fuel and the pressure due to gravitational force wins the pressure generated by the heat due to nuclear reaction at the star's core and the core of the star undergoes gravitational collapse.
Greater the mass, greater the gravitational force and greater the collapse of a start's core at the end of a its life and hence its fate.
Supernova Types
There are two types of supernovae which are type I supernovae and type II supernovae. Type I supernovae undergo through a process of runway nuclear reaction. Type II supernovae take place when the stars undergo a rapid gravitational collapse of their cores after running out of their nuclear fuel.
Type I supernovae happen in a binary star system (two stars orbit each other) where one of the stars is a white dwarf. The other star can be anything such as another white dwarf, a giant star or a star like our Sun. The other star can be any degenerate star (a compact star that is not a black hole).
A white dwarf star is what is left behind when a star like Sun runs out of energy by nuclear reactions. In the first type of supernova, the white dwarf collides or pulls matter from its companion star which reignites nuclear fusion and becomes very hot very quickly and bang! The white dwarf explodes outshining everything and leaves nothing!
In the second type of supernova, when a supermassive star (a star with enough mass for this to happen) runs out of its nuclear fuel, inward pressure due to gravitational force dominates causing the star's core to a rapid gravitational collapse. This happens so quickly causing shock waves resulting the explosion of the outer part of the star. And we witness the supernova as the resulting shock wave on Earth.
A star after going supernova can explode itself leaving nothing, leave a neutron star or if its core's mass is greater enough, it may leave behind an extremely dense, mysterious and deadly black hole!
Black Hole
Even the light can not escape from a black hole. That means you can not see a black hole! All the light that enters the black hole is trapped inside due its huge gravitational force.
There is a radius called Schwarzschild radius also called critical radius. It is the radius at which the escape speed from the black hole is equal to the speed of light. The spherical surface with this radius surrounding a black hole is called event horizon. Since even the light can not escape once it enters the event horizon, we can not see any activities what happens inside the event horizon.
What we can see about the presence of this mysterious object is its gravitational influence on other bodies, electrical interactions with other charged bodies and a rotating black hole shows some kind of space drag phenomenon - any object near a rotating object tends to move in the direction of rotation and for black holes this effect is tremendous near the event horizon.
The X-rays emission from the accretion disk formation around a black hole also give the signal of the presence of black holes. The materials (gas or dust) near black hole are pulled to form an accretion disk swirling around the black hole. As they move inward the materials are compressed and heated to generate very high temperature in the disk. Then the disk emits visible light as well as X-rays.
The evidences suggest the existence of even more supermassive black holes. One example is the existence of the supermassive black hole in the center of our Milky Way galaxy having mass greater than 4 million times the mass of the Sun.