Pressure
Some gemstones, such as diamonds, form in the Earth's mantle. There, the intense pressure and heat cause carbon atoms to compact into a pattern that gives them their distinctive appearance and makes them the hardest mineral in the world.
Hydrothermal
Other gemstones form from rapidly cooling magma. When the magma is exposed to water via cracks in the Earth, it crystallizes into solid minerals, including gemstones like emeralds and tourmalines.
Evaporation
Gems can also form when underwater mineral deposits dissolve and evaporate. Just as salt forms when sea water evaporates, other combinations of dissolved elements can form gemstones. Dissolved silica can form the gemstone amethyst, while copper helps make turquoise.