Quarks are the tiny particles within hadrons; both baryons such as a proton, and mesons such as a pion. They have fractional electrical charge, of either 1/3 or 2/3, of both plus or minus varieties. This is in comparison to the charge of -1 on the electron and +1 on the proton.

The quarks are fermions, with a spin of ½, this being a half integral spin.

The quarks possess another property called colour charge which prevents them from being isolated and which is the source of the strong nuclear force. The colour charge comes in three colours, 'red', 'green' and 'blue'. Anti-quarks possess either of three anti-colours: 'anti-red', 'anti-green' or 'anti-blue' (being cyan, magenta and yellow, respectively). The colour charge on any particular quark is not fixed, but can change. The change is mediated by coloured gluons, the force carrying particle of the strong (nuclear) force. There are 8 different bi-coloured gluons.

Quarks can also orbit within baryons or mesons in different spatial orientations, giving them yet another degree of freedom.

There are six different quarks, called flavours: up (u), down (d), strange (s), charm (c), top (t) and bottom (b). The table below shows their approximate masses, but their mass really depends upon their immediate neighbours.

Quark Mass (in amu's)
u (up) c. 0.005
d (down) c. 0.01
s (strange) 0.1 - 0.3
c (charm) 1.0 - 1.6
b (bottom) 4.1 - 4.5
t (top) 180 ±12

More recent figures for the masses of the quarks are given in the table below, but in MeV:

Quark Mass (in MeV)
u (up) c. 2.2
d (down) c. 4.7
s (strange) c. 96MeV
c (charm) c. 1,280 MeV
b (bottom) c. 4,180 MeV
t (top) c. 173,100 MeV

Quarks come in three families, or generations, with two flavours in each generation. The first generation contains the up quark (u) and the down quark (d) which is slightly heavier. These two quarks are the constituent of all ordinary matter, the protons and neutrons. These quarks have anti-particle equivalents, anti-up and anti-down, which possess the opposite colours.

A proton consists of two up quarks of +2/3 charge each, and a down quark of -1/3 charge, making +1 in total. An anti-proton would have two anti-up quarks, plus an anti-down quark, giving a total electrical charge of -1, exactly the same as the electron. The neutron consists of two down quarks, and one up quark, totalling zero electrical charge. An anti-neutron consists of two anti-down quarks, and one anti-up quark, still totalling zero charge.

The second and third generations are much heavier and could be regarded as being excited versions of the first family because they are un-stable. The strange quark ('s' for strange) partners the up quark, and the charm quark ('c') partners the down quark in the second generation. A typical example would be a Sigma-plus particle containing two up quarks, and a strange quark, written 'uus'. In the third generation a top quark (t) partners the up and charmed quarks which have the same +2/3 electrical charge, whilst a bottom quark (b), the heaviest of all quarks, partners the down and strange quarks which have the same -1/3 charge.

In the top diagram the quarks are all depicted as changing colours. (The gluons which accomplish this are not shown). The anti-quarks are shown in their anti-colours, again changing. If one quark in a hadron (which contains three quarks) changes colour, then all the other quarks must likewise change colour such that all three are differing colours - making white - hadrons are not allowed to display any overall colour, Similarly the quarks within mesons (which contain 2 quarks - a quark and anti-quark pair possessing a colour and it's anti-colour) must never display an overall colour - they must be white as viewed from outside. Quarks are never allowed to escape from the confines of their neighbouring quarks - it would take infinite energy to separate the quarks - and that energy given to them would be used to make other particles, some containing more bound quarks - you would never win. Quarks insist on being very close to other quarks, the closer the better, either in 3's or in pairs (although it does seem possible to also created quarks in 5's if you can confine enough energy to an extremely small space). Free quarks cannot exist; an analogy would be like having a sheet of paper with only one side, it is impossible. The electrical charge is shown beside the respective quark.

The three quarks in free neutrons and free protons (or in the proton within hydrogen-1) occupy a smaller volume than when they do within neutrons and protons contained in heavier nuclei, that is, are surrounded by other baryons. Thus, the proton within an aluminium or iron nucleus is about 10% bigger than one in a hydrogen-1 nucleus, and it is the same with the neutrons. The quarks within lone protons and neutrons are also moving faster than those within heavier nuclei. In nuclei with several protons and neutrons, the quarks within the larger nucleons seem to be communicating with those neighbouring nucleons.

Protons are heavy particles, at about 940MeV but their three constituent quarks separately weigh but 20MeV, and the gluons that bind the quarks have zero mass. Most of the mass of the hadrons like (protons and neutrons and mesons) comes not from the mass of the constituent quarks and gluons themselves, but from the zero-point quantum fluctuation energy of the confined quarks and gluons. It seems that the quantum vacuum excludes colour flux lines like a superconductor excludes magnetic fields. This bestows zero-point energy upon them. The mass of quarks is also greatly increased by the influence upon them by Instantons.
See Rogers' Twisted Tri-Prism Theory of Quarks