Each race has 3 stars. The first star is unlocked by completing the race. The second star is unlocked by winning the race. The third star is unlocked by completing the challenge stated at once you open the event. For example, the challenge for "Epic Stunt Sprint" is "Earn 10,000 skills points."
To get 3 stars, you need to win the race and complete the challenge in the same race.