In medieval times, alchemists tried to achieve  the seemingly impossible. They wanted to transform lowly lead into gleaming gold. History portrays these people as aged eccentrics, but if only they'd known that their dreams were actually achievable. Indeed, today we can  manufacture gold on Earth thanks to modern inventions that those medieval alchemists missed by a few centuries. But to understand how this precious metal became embedded  in our planet to start with, we have to gaze upwards at the stars. Gold is extraterrestrial. Instead of arising  from the planet's rocky crust, it was actually cooked up in space and is present on Earth  because of cataclysmic stellar explosions called supernovae. Stars are mostly made up of hydrogen, the simplest and lightest element. The enormous gravitational pressure of so much material compresses and triggers nuclear fusion in the star's core. This process releases energy from the hydrogen, making the star shine. Over many millions of years, fusion transforms hydrogen  into heavier elements: helium, carbon, and oxygen, burning subsequent elements faster and faster to reach iron and nickel. However, at that point nuclear fusion no longer releases enough energy, and the pressure from the core peters out. The outer layers collapse into the center, and bouncing back from this sudden injection of energy, the star explodes forming a supernova. The extreme pressure of a collapsing star is so high, that subatomic protons and electrons are forced together in the core, forming neutrons. Neutrons have no repelling electric charge so they're easily captured  by the iron group elements. Multiple neutron captures enable the formation of heavier elements that a star under  normal circumstances can't form, from silver to gold, past lead and on to uranium. In extreme contrast to the million year transformation of hydrogen to helium, the creation of the heaviest  elements in a supernova takes place in only seconds. But what becomes of the gold after the explosion? The expanding supernova shockwave propels its elemental debris through the interstellar medium, triggering a swirling dance  of gas and dust that condenses into new stars and planets. Earth's gold was likely delivered this way before being kneaded into veins by geothermal activity. Billions of years later, we now extract this precious product by mining it, an expensive process that's compounded by gold's rarity. In fact, all of the gold  that we've mined in history could be piled into  just three Olympic-size swimming pools, although this represents a lot of mass because gold is about 20 times  denser than water. So, can we produce more  of this coveted commodity? Actually, yes. Using particle accelerators, we can mimic the complex nuclear reactions that create gold in stars. But these machines can only construct gold atom by atom. So it would take almost the age  of the universe to produce one gram at a cost vastly exceeding  the current value of gold. So that's not a very good solution. But if we were to reach  a hypothetical point where we'd mined  all of the Earth's buried gold, there are other places we could look. The ocean holds an estimated  20 million tons of dissolved gold but at extremely miniscule concentrations making its recovery too costly at present. Perhaps one day, we'll see gold rushes to tap the mineral wealth of the other planets of our solar system. And who knows? Maybe some future supernova  will occur close enough to shower us with its treasure and hopefully not eradicate  all life on Earth in the process.