Most gemstones are minerals and originate from melts, solution, or vapors. The atoms arrange themselves from a disordered state into an orderly crystalline state, with growth dependent upon the availability of free space. Magmatic minerals crystallize from magma, lava, or gases and are found in igneous rock. Minerals that crystallize from hydrous solutions at or near the surface are found in sedimentary rock. New minerals formed from a recrystallization of existing minerals beneath the surface are found in metamorphic rock.
All rocks fall into one of three classifications, igneous, sedimentary, or metamorphic.
Igneous form from the cooling and crystallization of molten magma. Sedimentary rocks are composed of materials that result from mechanical and chemical weathering of preexisting rocks. Sediment is deposited in layers become rock when cemented or compacted together. The change is in a solid state, caused by high heat and pressure resulting from burial deep within the crust of from intrusive igneous rock. Gems can also form from solution as vein or secondary minerals.