RGB and CMYK are two formats for creating colors. RGB is used for color creation on the screen. It has three basic colors, red, green and blue. The LEDs on the screen light up according to the color that has to be created. In case no LED is on the color is black. RGB is called additive as the change in color is due to the lighting up of LEDs
In case of printing of paper, the medium is black in color, CMYK or Cyan, Magenta, Yellow, Key or black is used to create colors on paper. CMYK is called subtractive, as when color is added, the brightness from the paper is reduced. Here there is a special ink for black because using the other three colors together to create black is a waste of ink.
Understanding the difference between RGB and CMYK is important if you want to print something and achieve colors as close as what you want without wasting resources.