The first chamber is your sediment prefilter. It is designed to trap the big junk in the water, such as dirt/mud, and rust. They discolor the fastest. Change it when it appears dark brown. The cartridges are cheap (usually less than $7 each) and are often sold in multi packs. You can even get them at Home Depot.
The next one is the carbon cartridge. This one takes out chlorine and other chemicals from the water. These are tough to gauge when it's time because color is not an indicator of performance. More on this later.
The one on top (in the opaque horizontal white housing) is the RO membrane. These last a long time (provided you change out your sediment prefilter often)... usually tens of thousands of gallons. The way to know when it's time to change this is to use a TDS meter. When the TDS of your water reads over a handfull of ppm... maybe 6 or more, it's time to change it. This should only be every few years or more.
The final one is your DI cartridge. This one removes phosphates and silicates from the water. The way to know on this is to occasionally test your product water for phosphates. When phosphates register (anything above "undetectable") then it's time to replace this. This will be a frequent change... every 400 gallons or so. I like to replace my carbon cartridge on every other DI cartridge replacement.
Hope that helps!