First there is white light. When white light reflects off of something, the surface of that object absorbs a part of the spectrum of light and what bounces off is what we see as color. This is "subtractive color" because the object subtracts part of the spectrum to create the color and we refer to the light as "reflected" light because it bounces off the object before reaching the eye.
Projected light, like that coming from a monitor, doesn't reflect off of anything, so in order to create color we need to first break down the spectrum into simple wavelengths. We then start adding those simple wavelengths together is certain proportions to create different colors. This is "additive color".
Using a simple prism, we can see that white light breaks into a "rainbow" spectrum commonly seen as Red, Orange, Yellow, Green, Blue, Indigo, and Violet. The strongest, primary colors there are Red, Green, and blue. Most of the others are either secondary or tertiary colors we perceive that are a combination of the primaries. Some color theories put Violet in the primaries, but if I remember correctly it is so weak that it is hard to separate and project consistently. Red, green and blue work to create most of the gamut of colors.
For reflected (subtractive/ink) color, it gets much more complicated and there have been many color theories for what creates the best selection of pigments to combine to create the widest range of color. Most painters don't even think about primary colors, instead using as wide a range of different pigments as are available to them. Painters were painting long before the physics of light was understood. But as we learned the physics, we saw that certain pigments when combined would result in the reflected light creating primary projected light colors. So if you combine yellow and magenta, you get red. The three pigments that when variously combined at full strength to create the projected primaries are Cyan, Magenta, and Yellow. Percentage combinations of these three can be used to create nearly any color; however, the gamut of possible colors that these three can create is still smaller than what projected light can create simply because it isn't a perfect system. There are additional printing systems that would allow for the addition of orange and purple to the basic set of inks which allows for a much greater range of possible color reproduction (a bigger gamut).
So why Red, Blue, Yellow like you are taught in school? Because people like Blue and Red better than Cyan and Magenta and they are close enough that they can produce the colors that people understand easily.
Ultimately, these are referred to as "color theory" because there are several systems which can be used to describe or create color, and they all work on principles of wavelength physics.
Page on color
RGB world
Basic Principles