If the race is a handicap the handicapper gives them a certain amount of weight to carry based on past performances to try and make it equal for all horses in the race. The idea being that they would all cross the line together and in order to win the race a horse would have to improve its performance. This is only the case for handicaps though. There are other complications such as allowances for mares, penalties for previous wins within a certain time and age allowances too