Training zones can be based on either maximum heart rate or lactate threshold (anaerobic threshold). Max HR is primarily a function of your genes and your age, not your current level of fitness. Lactate threshold varies, depending on your fitness, so zones based on LT are a better training guide.
Estimate your LT
To estimate your LT, ride a baseline time trial. Pick a course that will take you 30 - 60 minutes to complete. The course can be flat or a consistent climb, preferably with no stop signs. Warm-up thoroughly (at least 30 minutes) and then ride the course as fast as possible. Note your time, average speed and average heart rate. If your time trial takes 30 minutes, your average heart rate will be very close to your LT. If it takes an hour, your average heart rate will be slightly below your LT. Multiply by 1.03 to estimate your LT.
Zone 1: Active recovery 65-75% of LT
In this zone you are burning primarily body fat for energy. You should be in this zone for recovery rides, for warm-ups and cool-downs and also for the easy portion of long rides. Training in this zone helps to build your endurance for tours and ultra races.
Zone 2: Aerobic 75 - 85% of LT
In this zone you are burning a mix of fat and glycogen (carbs) for energy. Training in this zone will improve your ability to transport oxygen. You should be in this zone much of the time during rides over three or four hours, except for climbs in zone 3.
Zone 3: Threshold 85-95% of LT
In this zone you are burning primarily glycogen for energy. Training here will improve your efficiency burning carbohydrates. You should be in this zone most of the time when climbing. You will have better endurance if you can climb in zone 3 and ride the flats and rollers in zone 2, instead of climbing at a higher heart rate and then taking a long time to recover in zone 1.
Zone 4: Lactate 95 - 105% of LT
In this zone you are burning glycogen for energy, but without enough oxygen, so you are going anaerobic. Training in this zone builds speed and your tolerance for lactate acid and over time raises your lactate threshold. This training is hard on your body and it takes a day or two to recover.
Zone 5: VO2 >105% of LT
In this zone, you are working completely anaerobically. Short efforts in this zone will increase your VO2 max, the ability of your body to transport oxygen to the working muscles.