Gas Clouds (of Hydrogen), starts contracting under the influence of gravitational pull of gas.
As it's contracting, it's pressure & temperature increases, it is called "Protostar" now.
When Temperature become sufficiently high (4 million C), Nuclear fusion starts, & large amount of energy releases.
Energy Travels to star's surface and is radiated in the form of light, heat & EM Radiation.
The contraction of star stops only when "Inward Gravitational pull" is balanced by "Outward Radiant Energy". At this time, star becomes stable in size & temperature.
Contraction continues, 'causes star's outer region to 'boil' & 'expand'. At this stage, it becomes brightest, red giant.
As fuel burns, helium nuclei fuses & form Carbon nuclei further to silicon & further to Iron Nuclei by progressive Nuclear Fusions. At all this stages, star was very unstable.
Star end it's life in many different way & it depends on it's mass, whether it ends as "White Dwarf", "Neutron Star" or "Supernova"
This was a short note on life story of star. Hope this helps!