There are two types of color mixing: Additive and subtractive. Additive color mixing is when you add light to create a color, like in a CRT (Monitor, TV set, etc.), and subtractive is when you remove light, like in pigments for ink and paint.
In additive color mixing the primary colors are red, green and blue, and the secondary colors are yellow, cyan and magenta. You can think of additive color mixing as 3 lights, one red, one green and one blue, all pointing at the same spot. These lights can give off different amounts of light to create different colors. When none of the lights are on you have black. If they are all on 100% you have white. And you can create any other colors in between by varying the amount of light given off by each. Below is a chart showing some of the colors that can be created.
Subtractive color mixing is just the opposite of additive color mixing. You use pigments to absorb light, and reflect the color(s). The primary colors are yellow, cyan and magenta, and the secondary are red, green and blue (reverse of additive color mixing). To get black, you have to mix the same amount of each of the primary pigments together. And you use none for white. A chart for the colors that pigments absorb is shown below.
If you wanted to create green, you would mix cyan and yellow. Because cyan absorbs red, and yellow absorbs blue, you are left with green.
The reason we have three primary colors is not because of the interaction of the different wavelengths of light or anything like that, rather it is entirely biological. The human eye consists of two types of photoreceptors, rods and cones. Rods are used for low level light detection, and are very sensitive to light, although they cannot be used for detecting color. Cones contain three pigments, one sensitive to red (577nm), green (540nm), and blue (447nm). It is these three pigments that allow for color vision, and it is where we get our three primary colors. The visible span of light in the human eye is around 700nm (deep red) to 400nm (violet). At 555nm (yellow green) the highest response out of any other wavelength of light is produced.