This is done in the very first level, Glimmer, and is best to do it in the outside set of crystals.
You need to beat 10 enemies to activate the flight power-up and make sure that once you're ready to try you jump through the portal to activate the power-up TOWARDS the red gem.
Once you hit the red gem turn LEFT (counter-clockwise) and hit all the gems along the way.
You don't have to exit the level if you fail, you can just retry infinitely