That's simple. Pigments absorb colours and reflect some colours. White light has been proven to be a linear combination of a range of frequencies from violet to red. This is where the colors of the rainbow come from. When you illuminate pigment with white light, if it is a near pure red, then only red is reflected. But if you mix the primary colors, then each absorbs its own lot, leaving nothing to reflect and you see black. I've written a few hubs on color theory if you would like to take a look.
On the RGB for your computer screen, this is the same as recombining the colours of the rainbow back into white light.
The so called primary colours for pigments are Red, Green, Yellow and the secondaries are green, orange and purple.
With light, the primaries are red, green and blue while the secondaries are cyan, yellow and magenta.
You might surmise there is something a little wrong with the definition of one of these and you are probably right. It's not really that clear that red,yellow,blue deserve to be callled pigment primaries. In colour print making, the combination used is Cyan,Magenta,Yellow (and black) aka CMYK (K is for black).
In this process, the printer lays down little dots of pure ink close to each other, and the mixing is done by the human eye. It's called optical mixing. Artists can do a similar trick.