Image: Abundances of the chemical elements in the Solar system. Hydrogen and helium are most common, residuals of Big Bang nucleosynthesis. All the remainder are residuals of supernovae. The lightest after helium (Li, Be, and B) are rare, as they are poorly synthesized in stars, but otherwise lighter elements are more common than heavy ones, as are elements with even numbers of protons, over those with odd.
Source: Wikipedia commons
Apart from Hydrogen and Helium which are the products of Big Bang nucleosythesis all observed chemical elements heavier that Helium (C, O, … called metals by astronomers) are synthesised inside stars. Stellar nucleosynthesis provides clues not only to stellar evolution but also to space-time distribution of matter in the universe. A probe to nucleosynthesis in our Galaxy is given by the chemical abundances in the solar system which testify for their abundance at the time of formation of the solar system. Evidence of nucleosynthesis in other stars has been discovered in S-Type stars by Merrill (1952). Population II stars are poor in metals whereas Population I are 2 orders of magnitude richer.
When the core of a star is hot enough, due to gravitational contraction, atoms are stripped off their electrons and collisions between atomic nuclei trigger nuclear reactions: the star establishes its hydrostatic equilibrium by radiating away some of the nuclear energy, hence its specific surface temperature. Nucleosynthesis in main sequence stars involves fusion of 4 Hydrogen nuclei into Helium (He4 or α-particle) through a chain of reactions called the Proton-Proton chain (as first discovered by Hans Bethe in 1939). More massive stars burn Hydrogen into Helium through a chain of reactions involving Carbon, Nitrogen and Oxygen (inherited from previous stars) through a process called the CNO cycle. These 3 elements play the role of a catalyst to synthesise 4 protons into Helium with the same energy outcome as the PP chain.
When the core becomes dominated by Helium the temperature is not high enough to trigger reactions involving He4. This allows gravity to contract the core even further until α-reactions are triggered, producing elements such as C12, O16 and Ne20 by fusing 3, 4 or 5 α-particles. These reactions are not direct but build up through binary reactions leading to Be8 (with a very short lifetime: 2.6 10-16 sec) and then the capture of a third α-particle to form C12. This triple α-process was suggested by Salpeter and completed by Fred Hoyle’s prediction of the existence of a C12 resonance line. At this stage Hydrogen occupies the outer layer which expands because of temperature increase. The star has now entered its red giant phase.
When Helium is exhausted energy generated by Helium burning ceases, giving way to gravitational contraction of the core. If the star is massive enough this rises the temperature to a level where C12 - C12 collisions start producing heavier elements such as Mg24, and O16 - O16 collisions producing S32 . If the star is less massive (about 1 solar mass) it enters the white dwarf degeneracy state. The continuation of this nucleosynthesis process will be made difficult by the high Coulomb barrier that the nuclei have to overcome. However, a massive star reaches the stage of Iron synthesis and ends up with an Iron core. More core contraction will not trigger subsequent nuclear reactions. What follows can only be explained by nuclear physics. Because Iron is the most bound element, all subsequent reactions will be endothermic (requiring energy supply) and no more energy supply will be provided to support the star against gravitational collapse. The star enters a runaway phase leading to supernova explosion where heavier elements such as Uranium, Lead and Gold will be synthesised through a combinations of neutron capture and decay processes.