Lots of good advice from Tom_L, but I would caution just one thing. That is the differences between aerobic and anaerobic workouts. It is true that anaerobic workouts will improve stamina and strength, but there should be a point attained in the level of aerobic workouts before moving on to anaerobic activity.
Most road cyclists starting out will have trouble achieving more than 25 miles in a work out session and will feel completely exhausted at the end and may even take 2hrs to complete. This is because their heart muscle is not developed enough to cope. Their heart blood volumes are at a level the majority of general population has. Aerobic training will slowly increase the size of the heart over a period of 2-5 years to the point where the heart blood volume is roughly twice that of the beginner when he/she first started out cycling. Resting heart rate will fall from the average of 70-80 to 40-50 BPM. Anaerobic training should only really be started once a base aerobic fitness level is achieved because anaerobic training has the effect of increasing the heart wall thickness rather than its volume. I would say that aerobic base level training would be been achieved once you are capable of cycling 60 miles under 3 hrs or 25 miles in 1 hr.
Competitive cycling will give you plenty of opportunities to carry out anaerobic activity, but without the foundation of the aerobic base, you will achieve nothing in competitive cycling, because you will probably give up competing before you are ready to take on others in a competitive race.