The protons and neutrons in the nucleus of an atom are held together by a strong force called the nuclear force or the strong nuclear force. This force is one of the four fundamental forces in nature, along with gravity, electromagnetism, and the weak force. The nuclear force is responsible for binding the protons and neutrons together despite the repulsive electromagnetic force between the positively charged protons.
The nuclear force is a very short-range force, acting only within the nucleus and over distances on the order of a few femtometers (10^-15 meters). It is an attractive force that overcomes the electrostatic repulsion between protons. The force is mediated by particles called mesons, specifically pions and other mesons. These mesons are exchanged between nucleons (protons and neutrons), transmitting the strong force and binding them together.
It's important to note that the nuclear force only acts within the nucleus and is distinct from the forces that govern the interactions between electrons and nuclei, which are governed by electromagnetic forces.