When the big bang originated, four forces were created. The EM spectrum force, the weak force, which governs how the stars shine, the gravitational force and the strong force. The strong force governed how the atoms in a nucleus are bound together (protons have a positive charge, and positive charges repel each other, and so the strong force overcame this and bound the atoms in a nucleus together) and electrons are swung into stability in their orbit in the valence because of a electromagnetic attraction between the positive charge of the protons and the negative charge of the electrons.
Stable atoms are where the force of EM attraction between the protons and the electrons is strong enough to hold the atom together. Unstable atoms occur when the force is too weak; an atom starts to lose neutrons and protons as it tries to become stable.
When an unstable nucleus loses a neutron, it becomes a radioactive atom that gives of energy as a result.