The nucleus is the central, highly dense, component of an atom and is composed of protons and neutrons (collectively called nucleons). It accounts for the vast majority of an atom's mass, however, due to the nature of electrons and the electromagnetic force that keeps the electrons orbiting the nucleus, only a small amount of an atoms size can be attributed to the nucleus (the electron cloud accounts for the majority).
There are two fundamental forces that were found in the nucleus, that aren't observed outside of nuclei. These forces are creatively named the strong force and the weak force. Tellingly, the strong force is extremely strong, in fact it's the strongest force known in the universe, but only acts over extremely small distances within the nucleus. It holds the nucleus together despite the intense electromagnetic force pushing apart the protons.
The weak force is about 1,000,000 times weaker than the electromagnetic force, but still quite a bit stronger than gravity. It balances the number of protons and neutrons within the nucleus by allowing beta decay (turning protons into neutrons or neutrons into protons).
These two forces together allow the process of nuclear fusion to occur, which is essential to life - nuclear fusion is what powers the sun! They also allow the process of fission to occur which is where nuclear reactors get their power. Additionally, these forces govern what sorts of radioactive decay occur. These forces are both actively researched in physics.
The University of Colorado has graciously allowed us to use the following PhET simulation. This simulation builds atoms from protons, neutrons and electrons and tests knowledge of the periodic table. The simulation shows how the neutrons and protons must balance for the nucleus to be stable.