* Igneous rocks: Quartz is a common component of igneous rocks such as granite, rhyolite, and dacite. These rocks are formed when molten rock cools and solidifies.
* Metamorphic rocks: Quartz is also found in metamorphic rocks such as gneiss, schist, and quartzite. These rocks are formed when existing rocks are subjected to high temperatures and pressures.
* Sedimentary rocks: Quartz is a common component of sedimentary rocks such as sandstone and conglomerate. These rocks are formed when sediments (such as sand and gravel) are deposited and lithified.
Quartz is also found in veins and pegmatites. Veins are narrow cracks in the Earth's crust that have been filled with minerals. Pegmatites are coarse-grained igneous rocks that are formed when magma cools slowly.
Quartz is the most common mineral on Earth, and it is found in every country. Some of the largest deposits of quartz are located in Brazil, Russia, the United States, and Madagascar.