small stars
The helium core runs out, and the outer layers drift away from the core as a gaseous shell, called a planetary nebula. The remaining core (80% of the original star) is now in its final stages. The core becomes a white dwarf that eventually cools and dims. When it stops shining, the now dead star is called a black dwarf.
massive stars
The core collapses in less than a second, causing an explosion called a supernova, in which a shockwave blows off the outer layers of the star. (The actual supernova shines brighter than the entire galaxy for a short time).
Sometimes the core survives the explosion. If the surviving core is between 1.5 – 3 solar masses it contracts to become a tiny, dense, neutron star. If the core is much greater than 3 solar masses, the core contracts to become a black hole.
http://www.astro.keele.ac.uk/workx/starlife/StarpageS_26M.html

