Atoms are constructed of two types of elementary particles: electrons and quarks.
Electrons occupy a space that surrounds an atom's nucleus. Each electron has an electrical charge of -1.
Quarks make up protons and neutrons, which, in turn, make up an atom's nucleus. Each proton and each neutron contains three quarks.
A quark is a fast-moving point of energy. There are several varieties of quarks. Protons and neutrons are composed of two types: up quarks and down quarks.
Each up quark has a charge of +2/3. Each down quark has a charge of -1/3. The sum of the charges of quarks that make up a nuclear particle determines its electrical charge.
Protons contain two up quarks and one down quark.
+2/3 +2/3 -1/3 = +1
Neutrons contain one up quark and two down quarks.
+2/3 -1/3 -1/3 = 0
The nucleus is held together by the "strong nuclear force," which is one of four fundamental forces (gravity and electromagnetism are two others). The strong force counteracts the tendency of the positively charged protons to repel one another. It also holds together the quarks that make up the protons and neutrons.
Note: Quantum physics describes the subatomic world as one that cannot be depicted in diagrams—particles are not dots in space (as depicted in this feature), but are more like "dancing points of energy."