You get a time star for crossing the finish line before the timer runs out. The first level that has a time star is "Joe's Got Style, a Groovy Style" in Stunt Weekly. You should manual and do flips and tricks in the air to keep your boost gage constantly flowing. It's beneficial to use boost in spurts instead of using it all in one go. This way you can refill your boost meter fast if you snag on something. For the longer time stars you're going to need to scope out the level a few times and find the path with the fastest route. Remember that going top speed and flying over the level is not always the best option especially if you're blindly flying into each section of the map.