Note to get this done quickly: Once you unlock debug mode by collecting 9-16 gold or silver medallions (the exact requirements are not yet clear), I'm fairly certain you can just spawn coins and checkpoints with it to get an endless supply of chances. I hope to confirm this shortly.
There are a total of 32 gold medallions you can unlock in Bonus stages. To enter a bonus stage, you need to cross a mid-level checkpoint with at least 25 coins. When you do, you'll see some stars appear above the checkpoint. Turn around and jump into the stars to start the Bonus stage.
You play each bonus stage sequentially. They get progressively harder as you play.
To get gold, you'll need to complete two primary objectives:
1. Collect all blue orbs.
2. Collect all rings.
If you hit a red orb, you lose. When you run over a blue orb, it turns red.
To spawn all the coins in the level, you'll need to make a ring around certain groups of blue orbs. Any group of blue orbs that's 3x3 or greater can turn into rings. Simply run in a circle around the blue orbs without going into the middle. Once you surround them with red, all the red and blue orbs turn into rings. This sounds complicated, but it's really quite easy. You can see it in each of the videos below.
The ideal way to do this is to intentionally leave a small group of blue orbs open that can't turn into rings and then go around turning all the groups of blue orbs into rings. Once the ring counter is zero and the blue orb counter just has your little group left, finish it off to complete the Bonus stage.
You can see an example of how to complete a Bonus stage in the video below:
Each time you complete a bonus stage, you unlock a special reward. You can play as many in a single level as you can fit in, so you might as well start working right away. The unlocks and medallions do carry over across playthroughs.
Track Progress? You can track your progress in the bottom right hand corner of the extra's menu.
Do Tracks Repeat? It's not clear if tracks you have gold on will repeat. You can definitely get repeats of tracks you failed before getting new ones.
Need some help?Check out these two video's. They're not mine but they show decent routes for every map. When you enter a bonus level, check the colors of the floor pattern and then find that pattern in one of these two videos.