You need to beat the specified time to earn the three stars for all 14 levels in speed run mode. This usually (not always) requires that you make almost no mistakes in the entire level and take advantage of shortcuts. Keep trying and you will eventually get these. Some levels do get frustrating...but just remember, each time you fail, you learned a little bit more about the level for your next attempt! The latter levels I actually found easier as they are longer, and it seems the 3-star times are more forgiving.