1. Born from a cloud of dust and gas in a galaxy, gravitational attraction between the particles draws them together so the cloud becomes denser, temperature and pressure of the cloud increases as the particles move together, eventually the pressure gets so great that the particles can fuse together, nuclear fusion occurs as hydrogen nuclei fuse together to form helium nuclei, releasing a large amount of energy in the form of heat and radiation, the heat energy released causes gaseous expansion which is felt as an outward force, opposing collapsing forces of the cloud due to gravity, radiation pressure provides another outward force, eventually an equilibrium is established, where the fusion-derived expansional forces balance with the forces promoting gravitational collapse
2. Eventually the star runs out of gas nuclei that can undergo fusion, the outward gas pressure decreases so the system is no longer in equilibrium, gravitational collapse results, and the star nears the end of its life, the mechanism with which this collapse takes place depends on the size of the star