It's a series of RGB LEDs in 3 strips in the wheel.
As it's spinning, it detects how fast it's spinning, and then turns the LEDs on to the correct colours to suit at the correct times, which then shows the picture
It's the same way those "frantically wave above your head and a message appears" things work