Quarks build up particles of the hadron family and hadrons can be devided up in two classes: Baryons which are heavy elementary particles consisting of three quarks, such as the proton and neutron. And mesons which are medium elementary particles consisting of a quark and anti-quark, such as the pions and kaons.
Quarks come in six different “flavors”:
up, down, top, bottom, strange, charmed.
The strange thing about quarks is that they don’t have an whole number charge, like most particles have. Instead they have fractions of charges:
up, charmed and top quarks have a +2/3 charge.
and down, strange and bottom have -1/3 charge.
All quarks have different masses.
Quarks also have different color charges(associated with the strong force), there are three different colours(these colors doesn’t have anything to do with the everyday colour we seen):
green, blue and red
For quarks too form a stable particle the combination has to be “white”. That means the all three colours has to exist in equal amounts, e.g. green+blue+red
Or the particle can be composed of quarks and their anti-quarks e.g. blue+anti-blue.
But since these particles are made by a particle and anti-particle those two will annihilate each other, so the particles with a quark and anti-quark will decay very fast. But they are perfectly stable though. Protons are made by two up and one down quarks. The up quark have charge +2/3 and the down quark has charge -1/3 so you see that two up quarks gives charge +4/3 and then add one down, you get +3/3 or +1 and so the proton has a postitive charge.
Neutrons are made of two down and one up quark so this becomes a total of 0 which means that the neutron has a neutral charge.