The sensor in a digital camera contains millions of tiny photosites (light receptors), each one of which is sensitive to light – but not to colour. To capture colour data, each photosite is covered by a red, green or blue light filter. This means that some photosites are now sensitive only to red light, some only to green, and some only to blue. By clever processing of the data from all the photosites, the sensor can work out the exact proportion of red, green and blue light at any given point, which determines the colour of the corresponding picture element (pixel) in the full-colour image created in-camera from that data.
Computer screens also use red, green and blue (RGB) data. In fact, any imaging system using emitted light (such as a digital projector or a television screen) uses the RGB system. With RGB, when no light is emitted, you have black, while mixing all three colours at equal intensity produces white. In between these extremes, combining different intensities of one, two or three of the primary colours produces the entire range of hues you see on-screen.
The problem is that this system does not work when you want to transfer an image to paper. Paper does not emit light, it reflects it. If you lay down red, green and blue inks together on paper, you get a muddy brown colour, not white. And if you put no inks on the paper, white paper remains white, not black. So, for printing onto paper, the CMYK printing process is used.
CMY stands for cyan, magenta, yellow. Mix equal amounts of two of these together and you can make red, green or blue. Mix equal amounts of all three and you get black – almost. Because inks are not perfectly opaque, the black appears as more of a dark brown colour, so a pure black ink is added. Black is not denoted with the letter B because it would be confused with blue, so K is used instead. The result is the CMYK system. All the colours produced by a CMYK printer are created by laying down cyan, magenta, yellow and black ink in different proportions. (Strictly speaking, the different colours of ink are never actually mixed. If you enlarge a printed image, you can see that it consists of tiny dots of distinct colours, and the "mixing" is an optical effect, causing the eye to perceive different colours.)
In the RGB system, when no light is emitted you get black, and increasing the intensity of all the colours gets you closer to white. For this reason, the RGB system is described as additive. In the CMYK system, when no ink is laid down, white paper remains white, and adding more colour gets you closer to black. Accordingly, CMYK is described as subtractive.
Although printers work with CMYK and your images are in RGB, you should not perform a CMYK conversion yourself in your image editing software prior to printing your images except in very specific cases, such as when you are producing a hard proof to send to a client for colour matching. The printer driver software will do the appropriate conversion from RGB to CMYK to ensure the best results.