Quarks are fundamental to making protons and neutrons
Quarks are fundamental particles which exist in several forms see quarks and leptons. Only up and down quarks are stable and they are key building blocks of all hadrons of which protons and neutrons are most important to us.
The proton is made from two up quarks, charge +2/3 and one down quark, charge -1/3. The total charge is therefore 2/3 + 2/3 -1/3 = +1
The neutron consists of two down and one up quark, the charges cancelling to a total of zero.
The quarks themselves have a relatively small mass.
The repulsion of the like charges of the quarks is overcome by particles called gluons. These glue the quarks together with the “strong force” which overcomes the electromagnet force of repulsion between like charges.