Where do the heavier elements come from? Partly inspired by this question, the end result of stellar fusion is Iron-56 (eventually, after some decay). Then it explodes. How/where then to the heavier elements come from. The answer here mentioned two colliding stars form gold. What process is taking place to form this gold (and I'd assume the rest of the heavier elements)?
The processes at work are the r-process and the s-process.

The r-process occurs in supernovae. Under the extreme conditions leading up to it, heavy elements are initially blocked from undergoing beta decay to other elements. If a heavy atom captures a nearby neutron, it can go to a heavier isotope or element. This happens multiple times to an atom, producing heavy elements.



The s-process is slower, and occurs under less dramatic conditions in asymptotic giant branch (AGB) stars - a certain type of red giant. It also uses neutron capture and the subsequent decay of that neutron into a proton. Over thousands of years, atoms climb to become heavier elements. The s-process, though, requires that there already be some heavy elements in existence, unlike the r-process.



For more information, Hyperphysics, this lecture and this German site (in English) are very useful.