Why Does the Earth Make Diamonds?

How do plain chemicals become glittering gems?