Some crystals are earned automatically, others need to be collected, some need to be bought from the trade shack.
At the end of a level it shows how many crystals you found, and how many you missed.
You can replay levels to collect missed crystals or earn for buying them at the trade shack.
For a crystal guide, check http://www.xbox360achievements.org/forum/showthread.php?t=15...
Crystal guide credits: Ponypo2001