RGB are primary colours. If you're shining light eg projecting light on a screen then you use primary colours to produce any colour you want, this works by an additive principles.
CMY are secondary colours. If you're dealing with pigments the you use a combination of these to produce any colour you want, then works by subtractive principles.