Gems result from the crystallization of minerals or elements when they contact oxygen underground.
A wide variety exists: quartz gems, transparent gems, opaque gems, and, of course, diamonds. Most commonly, gems are mined from the ground like minerals and metals. (Pearls, however, are harvested from oysters.)
For thousands of years, humans have dug for precious materials. Sometimes, however, underground shifts cause lava and rock to force their way to the surface. The underground wealth has no choice but to go along for the ride.