A lot has been learned about stars from new telescopes, both in space (e.g. Hubble) and on Earth (e.g. Keck).
Coming out of the Big Bang the normal (baryonic) matter of the universe was about 3/4 Hydrogen and 1/4 Helium. See Found: The First Atoms In The Universe!!!. Technical details can be found in Big Bang Nucleosynthesis (BBN).
Red dwarfs in regions of cooler gas. They are very common. They are so many of them that
our sun is brighter than about 85% of the stars in our galaxy.
Star formation begins when some of the gas cloud begins to contract into a protostar. The gas cloud may be ablated by radiation from larger nearby stars, sometimes with spectacular results, such as the Mystic Mountain of the Carina nebula. A protostar shines just by the radiation from gravitational contraction, not by nuclear fusion. As it contracts it is likely to also form a protoplanetary disk. The gas cloud may be ablated by radiation from larger nearby stars, as seen in the Mystic Mountain of the Carina nebula.
If the protostar is sufficiently massive, then the heat from the gravitational contraction will eventually make it hot enough for nuclear fusion to start. At that point the protostar becomes a star.
Planets may in turn be created out of the protoplanetary disk. Many exoplanets (planets orbiting a star other than our sun) have been discovered. When an exoplanet passes in from of its star (as seen from Earth), there is a small but measurable drop in the amount of light that reaches us. The observed light curve can give a lot of information. A couple interesting exoplanets are HAT-P-7b and Kepler 16b, informally called “Tatooine.”
Inside a star, fusion takes place in the core, which is much hotter than the surface. The energy
from fusion balances the inward force of gravity, preventing further gravitational collapse. The
star is in hydrostatic equilibrium. This phase of a star’s existence is called main sequence burning. Our Sun has been in that state for about five billion years, and will remain there for about another five billion.
Eventually the star will run out of Hydrogen in the core. Gravitation, no longer opposed by
fusion, will make the core contract. This will warm the core some more and ignite Hydrogen fusion in a shell around it. The extra energy will cause the outer layers to greatly expand, and the star will become a red giant. See Stellar Evolution I – Solar Type Stars
The contraction of the core will raise its temperature, perhaps to the point where three Helium nuclei can fuse into a carbon nucleus (the triple alpha process. This yields more energy, but is much less efficient than Hydrogen fusion. Some of those new Carbon nuclei may fuse with other Helium nuclei, yielding Oxygen. Large amounts of matter will be ejected from the star. When the Helium at the core is finally gone there will be a particularly large ejection, resulting in a planetary nebula. Beautiful examples are the Helix Nebula, the Bug Nebula (from a binary star system) and the Cat’s eye nebula.
For most stars this is the end of the line. The core cannot contract enough to ignite further fusion. Complete graviational collapse will be prevented by electron degeneracy, producting a white dwarf. As the dwarf age it will cool down as energy is radiated away.
In larger stars the contraction of the Carbon-Oxygen core may raise the temperature to ignite further short-lived fusion reactions, yielding Neon, Sodium, Silicon, Sulfur, and eventually Iron. However this is the end. You cannot gain energy from Iron fusion, rather the opposite. At this point the core finally collapses. The outer layer explodes in a supernova. The core ends up as a neutron star=pulsar. The Crab Nebula is what remains from a supernova in 1054 AD, with a pulsar in the middle. Cassiopeia A is another supernova remant.
The energy of the supernova allows nuclei heavier than iron to be formed by fusion, and it is the only way that can happen. Furthermore, the explosion disperses all those elements from the star into the galaxy. They join the interstellar gas, some of which gets recycled into new stars, planets, and people.