Where do the heavier elements come from?
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.