Electrons in an atom are bound by the electrical force of attraction between them and the positively charged nucleus. However, something that acts like a "nuclear glue" holds the nuclei together in spite of this is a much stronger nuclear force. This is called binding energy.
Binding energy is the energy that holds a nucleus together; the difference between the sum of the masses of the individual nucleons and the actual mass of the nucleus. In other words, it is the energy needed to disassemble the nucleus into its constituent neutron and protons and the energy is released when that nucleus is assembled from its component parts. (e.g. trying to pull apart two magnets)
The larger the binding energy, the more stable the nucleus.