The gorgeous swirls of color you see are created by convection, a highly efficient form of heat transfer that drives the circulation in the earth’s atmosphere, oceans, and mantle.
Convection can only take place in fluids—that is, liquids and gases—and it relies on changes in density. Heating causes the water to expand in volume, making it less dense. Cooling, meanwhile, causes the water to shrink in volume and become more dense.
These density changes put fluids into motion: Inside your CD case, you can see the cooler, denser, blue water creep across the bottom toward the warmer side, while the warmer, less dense, red water is buoyed upward.
In time, the blue water on the warm side of the case gets heated too, and gets pushed upward by the continuing approach of the cooler water from the cold-water side. Meanwhile, the red water moves across the top of the container toward the cold side, losing heat as it travels, eventually cooling enough to sink.
The cycle of heating and cooling continues, creating a convection cell, a circular pattern of rising and falling fluid.