In the early 1960's Murray Gell-Mann proposed that subnuclear particles (protons, neutrons and various mesons) could be explained by the existence of three "states", each with an anti-state, that satisfied certain laws of group theory (they were "representations of the Lie group SU(3)"). His theory was called the Eightfold Way. He thus collated a lot of behavior that physicists already knew about into one tidy package, and actually predicted a new meson with it, but he refused to consider the states, which he called "quarks" to be real. He thought they were just mathematical abstractions. In this theory, the proton had three quarks, two of the kind called "up" and one of the kind called "down". And the neutron also had three quarks, two "downs" and an "up".
About five years later, physicists shooting electrons at nuclei found evidence for three pointlike particles inside the proton and the neutron. It was natural to identify these phenomenal particles with the theoretical quarks, and when this program was fully carried out, the result was quantum chromodynamics (QCD). Quarks are now thought to be particles that make up the nucleons and mesons and obey the physical laws embodied in QCD.