Physicists use the theory of quantum chromodynamics to explain the characteristics of one of the four basic forces in the universe, the strong nuclear force. In QCD, quarks and gluons are said to have a certain colour. The colours are; red, green, and blue, and their anti-colours; anti-red, anti-green, and anti-blue.1 (Anti-colours are just a way to visualise the colours of anti-particles.)

Subatomic particles do, of course, not have any actual colour. In fact, there is no way to ever 'see' them in the normal sense of the word, as the wavelengths used by light are much, much larger than the size of any subatomic particle. The colours are just used to visualise certain properties of these particles.

Because of a characteristic known as confinement, particles with colour can only exist in combinations that result in the colour white. There are two ways that quarks can bond to form the colour white. (Particles formed when quarks bond are known as hadrons.) The first is three quarks, each of a different colour. The second way uses just two quarks, one of a colour and the other one of that colour's anti-colour. The particles formed using three quarks are known as baryons. Protons and neutrons are examples of baryons. The particles formed using two quarks are known as mesons.2 Mesons are quite unstable as they consist of a quark and an anti-quark, capable of annihilating each other.

Gluons can also bond in a similar way. The unstable particles formed by these bonds are known as glueballs.

Why quarks and gluons only can exist in combinations that make up the colour white and not alone or in other combinations is currently not known. It is, however possible to make them act as if they were stand alone particles. This is done by accelerating them in a particle accelerator. As the kinetic energy increases, the strong nuclear force decreases and the particles start acting more and more as stand alone particles.

1 Zarkonnen points out that "the anti-colors are sometimes called cyan, yellow and magenta." Thanks!
2 Gorgonzola says The quarks making up a meson aren't a single color and its anti-color; a meson is a quantum superposition of a red/antired state, a green/entigreen state, and a blue/antiblue state.

A brief history of time by Stephen Hawking