Each jersey hs its own competition within the race.
Yellow is the lowest time.
Green = Points are awarded for finishing places, the higher up you finish, the more points you get, and thse points accumualte throught the Tour.
Polka dot = Mountain climber points are awarded for the first few caross the line at the top of certain climbs and the end of mountain stages, the one finishing the Tour with the most points takes the title.
One jersey I forgot to mention.
Light Blue = Hot spot sprint points - This has a bit of history.
Many years before this competition was formally started, individuals would make it known to the organisers that they intended to award some sort of prize for the first rider across a line drawn at a point of that individuals choosing, sometimes prizes could include farm livestock, cash or perhaps a years supply of wine, and this led to some very unusual prizes such as chickens etc.
This was back in the day when many riders came from rural districts and these prizes were a supplement to the income of lesser riders whose duties were dedicated to the team leader.
Roll on a few years, and if local mayors wanted the tour through their town, they would sponsor that days stage and award a prize for the first rider across a line in the middle of some previuosly unremarkable village, a good civic publicity tool.
This kind of thing still happens in the smaller races.
In the tour the organisers noted that riders would often only really get racing properly over the last 50 kilometres, because the tour was so arduous and the stages so long.
This does not make for good spectacle, so the number of stages was reduced, a couple of rest days fitted in, some stages became shorter, and the hotspot sprint comettition added.
All that happens is that the first three riders across a line partway into a stage, can win points, and much more important, they can win back time, sometimes as much as 20 seconds.
There are usually three hotspot sprints in stage, these are on the early and late stages rather than on the mountains.
No team leader can afford to ignore the time bonuses available and let them go to their rivals, so they will work strategies to ensure that someone in his team is always availble to contest them.
Bad luck can play a major part, many tours have been won and lost on a crash, if one happens it is often the signal for other teams not involved to mount an attack, especially if one of the other big players goes down.
There is a certain etiquette involved in crashes, if it is known that serious injuries were incurred, the race may well slow down drastically to allow riders to remount, I do remember occasions where a major rider has been carrying an injury such as a cracked collarbone (Pascal Simon) and it was considered very poor form to mount an attack on him the following day, usually the peloton will allow the injured rider a day or so to see if they are capable of conitinuing the race. The domestiques rarely get this luxury, they are effectively cannon fodder.
If a rider knows he cannot go on, but his bike is ok and a colleague can go on but his bike is damaged, then they will trade machines until the team car can supply one of the spares.
If the main riders in a team get a puncture, it is usual for team mates to pass them their good wheel.
If the main riders in a team, especially the team leader is delayed for any reason at all, the rest of his team will drop back, and pace him into the main field.
On narrow mountain roads the team cars are strung out, their order is determined by the race organisers, arguments about which team car should be in front of another are very passionate and political.
If you are a rider and have a problem, you need your team car to be on the scene as soon as possible, if your team car is stuck in line behind 10 other team cars, or more this could lose you valuable time.
There is a neutral team car that will assist any rider in trouble, it is usually first in line behind the main race marshalls car.
The neutral support car tends to be used more when a break in the bunch occurs. Teams are only allowed one team support car and if a break occurs, the neutral support car is deployed to support the breakaway group, leaving the team support cars to deal with the main field.