This is the periodic table of elements, showing nuclei at the center of atoms:
Each nucleus except of the hydrogen atom, contains a mixture of protons and neutrons held together by forces that can only be described using quantum mechanics. Stable nuclei are the ones where the forces binding protons and neutrons allow fixed energies and no probability of decay or tunneling,( even though the neutron by itself is unstable and decays into a proton and electron and an electron antineutrino if in free space). The forces are such that the number of neutrons and protons have to balance, between the repulsive electric forces of protons and the attractive strong force between the protons and neutrons.
There exists a stability line for the balancing of forces, and if too many neutrons or too many protons are there, the nuclei are unstable and will decay with a calculable probability.
Isotope half-lives. Note that the darker more stable isotope region departs from the line of protons (Z) = neutrons (N), as the element number Z becomes larger
Beta decays are particular decays connected with the mechanism of free neutron decays, and one can read up on them in the wiki article.
In nuclear physics, beta decay (β-decay) is a type of radioactive decay in which a proton is transformed into a neutron, or vice versa, inside an atomic nucleus. This process allows the atom to move closer to the optimal ratio of protons and neutrons. As a result of this transformation, the nucleus emits a detectable beta particle, which is an electron or positron