essentially the different duty cycles of PWM make the led get brighter or dimmer.
On an RGB LED, using PWM can control the intensity of each element allowing you to get almost any colour.
This is the same as pixels, each element has a certain intensity.
Due to the different physical qualities of each element in the LED the relationship is probably not exact.
Check out ShiftPWM or any of the fine examples here on the forum ( search bar above right ).
Or simply whack an RGB LED and a few resistors into the PWM ports and have a play.
This is the place I bought mine from: http://stores.ebay.com.au/LED-Wholesale-World/4pin-RGB-Anode-Cathode-LED-/_i.html?_fsub=2441707010&_sid=1016205190&_trksid=p4634.c0.m322
I'm currently using some of the 5mm common cathode versions. They seem good quality.