Red, blue, and yellow are subtractive primary colors. E.g. if an object absorbs(subtracts) red light, then under white light it looks green (blue+yellow remained). This is how colors work in painting.
On the other hand, your monitor does not absorb colors, but emits it. If you shine red and green light on a white surface (or on your eye directly), you will see green. This is called additive color. RGB (red, green, blue) are primary additive colors.