Ski racers spend a lot of time in interval training. After stretching and some easy warm-ups, they will work extremely hard for a short period. Then some more easy skiing followed by another spurt of energy.
Cross-country racers will work on uphill climbs as hard as they can for up to 45 seconds or so. The interval training helps one assimilate oxygen most efficiently.
In a cross-country race, of course, a prime object is to make sure you don't expend more oxygen than you take in, particularly early in the race. a critical factor is finding your own pace and sticking to it. This can be easier said than done during a mass start, when the temptation to get and stay ahead of the pack can be great.
By skiing within your capacity to assimilate oxygen, however, you're likely to have that happy 1-can-ski-forever feeling 10 kilometers out. then near the finish, when a sprint may be needed, the interval training you've practiced should come in especially handy.
Don't forget to drink some liquid at every feeding station on a race course. Such a precaution, even if you don't feel thirsty, will ward off any fatiguing dehydration.