A chemical element is a type of atom, like hydrogen or oxygen. As of 2011, 118 elements had been observed, with 98 of these occurring naturally on Earth. 20 elements are artificially created in nuclear reactors or particle accelerator experiments. The first synthetic element to be created in substantial quantities was plutonium, element 94. Plutonium is also the heaviest atom found naturally on Earth. With a half-life of only 80 million years, plutonium occurs in extremely small quantities in uranium ores.
Present-day chemical elements come from one of three sources: supernova nucleosynthesis, stellar nucleosynthesis, and Big Bang nucleosynthesis. Nucleosynthesis occurs when atomic nuclei are pressed together so closely and at such high heat that they overcome the mutual repulsion of their electron shells and produce heavier nuclei. In this way, hydrogen nuclei can be fused into helium nuclei, which can in turn fuse into carbon nuclei, if conditions of sufficient temperature and pressure are reached.
At the beginning, the universe was so hot and dense that it consisted of nothing but free quarks — the constituents of protons and neutrons — electrons, and radiation. After a millionth of a second, quarks began to fuse into baryons: protons and neutrons. For the first twenty minutes after the Big Bang, the temperature of the universe exceeded that in the center of the brightest stars, with a density greater than air. During this period, protons and neutrons collided energetically to form larger nuclei: deuterium and two isotopes of helium. 25 percent of all the matter in the universe was converted into helium, with about 75 percent hydrogen, along with trace amounts of heavier elements such as lithium. This is similar to the current-day ratio of chemical elements.
The first stars formed about 300 million years after the Big Bang, initiating another form of nucleosynthesis called stellar nucleosynthesis. In stellar nucleosynthesis, greatly compacted matter in the center of a star undergoes nuclear fusion, releasing large amounts of energy and balancing out the forces of gravity acting to collapse the star. This can be thought of as a continuously exploding H-bomb. Elements up to iron on the periodic table are formed in stellar nucleosynthesis.
To create an element that's heavier than iron requires another type of nucleosythesis, supernova nucleosynthesis. Supernovae occur when stars collapse catastrophically after consuming all their nuclear fuel in their cores. The atmospheric envelope of the star collapses inward due to gravity, bouncing off a core made of nearly-incompressible "electron degenerate" matter. During this abrupt bounce, several percent of the star's material is fused into heavier elements nearly instantaneously. This releases enough energy for the supernova to outshine its host galaxy for days or weeks. Elements heavier than iron are synthesized during this incredibly energetic cosmic event.