The atom contains subatomic particles that are called protons and neutrons at the center in a dense area called the nucleus of the atom. Other particles circle around the nucleus in orbits called shells. What keeps the atom electrically stable is that the center of the atom and the particles moving around outside of the nucleus carry opposite electrical charges.
The negatively charged electrons, named for their negative charge, which are held more stable by the counteracting positive charge of the protons in the dense center of the atom. The charge of the proton is equal and opposite to that of the electron in the atom.
The proton, although very small, is made up of quarks. Quarks were discovered in the 1970s, some 30 years after the discovery of the neutron, and roughly 60 years after the discovery of the proton. Quarks attributed to giving the proton it’s a positive charge.