Each car that finishes a race gets points. The higher your position on the leaderboard, the more points you will get at the end of the race. The aim is to get more points than your two rival cars.
This often means you don’t need to fight for first and second positions - you only need to score more points than your rival to win.