To do this, you need to earn stars for challenges. These could mean online wins, using a certain power-up so many times, or get a certain score so many times. You can play many of them on custom holes, so you can make your own or find one that's set up. Pro tip: Making a good achievement hole may help votes for Master Builder.
Blue gems and purple gems usually have to be won on tournament holes, but there are exceptions.
I just started keeping track of what the challenges are. I missed level 26, but I'll post them from 27 on.
Level 27:
*** Spoiler - click to reveal ***Play 52 holes on any theme
Make 30 long putts from over 20 meters
Use 35 power-ups
Get at least 13,000 on 40 holes
Win 2 online matches in a row - You need public for this, but one person can quit out after a hole
Level 28:
*** Spoiler - click to reveal ***Make a putt with 2 cushions 30x
Collect 13 purple gems in online multiplayer
Collect 250 purple gems
Play a course in online multiplayer
Play 50 holes on any theme
Somehow I skipped level 29.
Level 30:
*** Spoiler - click to reveal ***Play 56 holes on any theme
Make 9 drive-ins from 10 meters
Make a put within 7 seconds 3x
Collect 2,000 blue gems total
Win a course in online multiplayer