A star begins its life from Hydrogen gas. Gas particles of Hydrogen gas are brought together due to the gravitational force of attraction between them. There is an increase in Kinetic Energy of these gas particles and as such the temperature of this clump of gas starts to increase. When the clump of Hydrogen gas begins to glow, a so called 'protostar' is produced. When the temperature of the star, which is steadily rising due to increase in KE, reaches 10^7 K, the star is able to fuse Hydrogen atoms together to produce Helium atoms and the energy of this fusion reaction is released outwards (radiation pressure). The outward radiation pressure perfectly cancels out the inward force due to gravitational attraction and as such a stable main-sequence star is formed. Eventually after several billion years (in the case of our own Sun), the Hydrogen fuel begins to run out, and the gravitational collapse begins to overcome the radiation pressure. The core begins to shrink. The temperature rises and the outer gaseous layer of the star begins to expand, producing an enormous red giant star. Now, the star can evolve in several ways. If the mass of the Star is less than the Chandrasekhar limit (1.4x the mass of our Sun), the core eventually transforms into a white dwarf. This is the end of the star's life. For stars heavier than the Chandrasekhar limit, the radiation pressure and electron degeneracy pressure is not enough to hold back the gravitational collapse of the massive star and the core collapses in a violent, powerful explosion known as a supernova. After the supernova, a neutron star remains. This is held together by a force called neutron degeneracy pressure. (Typically off syllabus). For even larger stars, the neutron star transforms to a singularity or a black hole, where not even light can escape it, This is because the escape velocity of this immensely strong gravitational field is greater than the speed of light.