Yes, you heard that right. To improve you need intensity and intensity hurts. You have to push yourself and doing so will hurt. It will hurt while you do it and it will hurt afterwards. It is not the type of stuff you want to do all the time, but it is essential preparation for racing. Far too often people are happy just to cover the miles, to do the time over and over again. Such a non-changing program will not produce results.
Race preparation requires distinctive steps. First you need to build a base. During this phase you ramp up slowly from where you are to where you want to be. You need to ramp up until you can cover the distance or at least 75-80% of it, without undue stress. That takes time. During this phase you don't need to go hard, you need to go long. Building a base is something you do in the off-season and you need to do it again every year. The more time you take off, the longer this phase will be. It is possible to stay in a state where you maintain a good base, but even then you should do a few long efforts at the start of your season.
Once you complete the base-building phase you need to add intensity. There are two types of intensity training: tempo and intervals.
When you start this phase, you first cut back on the length and distance of your workout. To compensate you up the intensity. Tempo is any swim, bike, run, row done at constant high speed. It is often called "race pace," and is done at slightly below or somewhat above the desired race speed. As always, you start out slower and get faster as time progresses. You also go longer.
After a six to ten tempo sessions you should start to add in interval workouts. An interval workout is any workout that alternates high intensity with relative rest. A common prescription is seven to twelve high intensity bouts with some longer low intensity in-between. There are many variations on this theme and entire books have been written on just interval training. Yet the prescription is simple: warm-up, go hard, recover while keeping going, go hard again, and so on. For endurance the best intervals are slightly longer intervals done at 80-90% maximal effort. It is best to rest before an interval workout so you can go really hard when you have to.
From now on until race date, you need to alternate tempo, intervals, and rest. The closer you get to your peak week, the more intervals you need. Your peak week is one to two weeks before the actual race. After your peak week you reduce the amount of training, but not the intensity. It is called "a taper," and the longer your race and the more high impact, the more you need to taper. So you taper more for running than for biking or swimming.
It is important to insert plenty of rest. If you are not well rested you won't be able to hard during training. If you can't go hard, the training won't be as effective. You need not worry so much about a bit of extra rest. A few days of rest won't harm your performance. If anything, you may do better. Many athletes compete without adequate rest. The older you get the more rest you need. Take at least one day a week off, and rest two days before a major race. You will do better too.