Stellar nucleosynthesis
In the s-process and r-process, large nuclei collide with neutrons. Sometimes, a nucleus will then go through beta decay, and a neutron will change into a proton. The "s" stands for "slow", because it happens more slowly, when less neutrons are nearby. It can happen inside red giant stars. The "r" stands for "rapid", because it happens more quickly, when more neutrons are nearby. The r-process can happen in a supernova. These are an important source of rare, heavy elements.