Explosive nucleosynthesis is the creation of heavy elements which occurs in the heart of a supernova. A supernova is a hugely energetic astronomical event where a supergiant star depletes its nuclear fuel and collapses under its own gravity. The infalling matter bounces against a superdense core, creating an explosion and a shock front which travels away from the core at speeds of up to 2000 km/s. A supernova can outshine its host galaxy, and they have been observed by astronomers since ancient history.
Stars obtain their energy through the fusion of atomic nuclei, mainly hydrogen and helium. This is called hydrogen and helium burning. In very massive stars, the burning of these elements creates an "ash" of heavier and heavier elements — carbon, neon, silicon, iron, and nickel — until finally the amount of energy necessary to fuse nuclei exceeds the energy it releases, and the nuclear chain reaction is extinguished. What is left is an iron-nickel core consisting of approximately 1.38 solar masses, which then collapses quickly into either a neutron star or a black hole, causing a supernova from the bounceback. Another type of supernova, called a Type Ia supernova, occurs in less massive stars. A Type Ia supernova occurs when a carbon-oxygen white dwarf exceeds the same 1.38 solar mass threshold and burns all of its contents in a matter of seconds.
In both types of supernova, temperatures in the billions of degrees are created at the core, and several solar masses of material is ejected outwards at 3% of the speed of light. Even though fusing together iron and nickel nuclei is very costly in terms of energy, a supernova is more than enough to initiate the necessary reactions. Every element heavier than iron on the Periodic Table is either created in supernovae explosions or is a decay product of those elements.
Supernova nucleosynthesis is only one category of nucleosynthesis. The more typical type of nucleosynthesis is stellar nucleosynthesis, primarily of the hydrogen and helium burning type mentioned before. There is also Big Bang nucleosynthesis, which occurred during the first three minutes of the universe's existence. During this event, 24% of the initial hydrogen atoms in the cosmos were fused into helium nuclei. Currently, the observable universe is made up of about 74% hydrogen, 24% helium, 1% oxygen, and 1% other elements.