What It Is
The chemical formula for quartz is SiO2, also known as silicon dioxide. The earth contains a large amount of silicon dioxide, since it is more common in the earth's crust than other more complex chemical formulas, including silica and oxygen. Quartz is present in many other types of rock, including granite, sandstone, shale, schist, gneiss, quartzite and various other rocks in all three major categories--igneous, metamorphic and sedimentary.
Quartz can be formed naturally from the silica which collects in the earth. When silicon (Si) and oxygen (O2) combine, it will create silicon dioxide (SiO2), which is quartz. For this reason, quartz will form underground quite easily whenever a combination of oxygen and silica-rich solutions are present. The formation of quartz is generally at an angle, as the dripping of the solution causes quartz to form atop itself, which explains the quartz "spears" sometimes seen in nature. Quartz contains a crystal lattice, and does not require any specific temperature or pressure to form, occurring naturally from the presence of its component parts.
In spite of the vast amount of naturally occurring quartz, most quartz used for industrial purposes is man-made. A heat treatment can be used to synthesize various types of quartz, especially by the use of high pressure and temperature in water. Most commonly, silicic acids (those that contain silicon) will be broken down in water where the SiO2 from the acid will be separated from the H2O, thus creating water and quartz. As heat in a solution drops, the saturation point will be lowered, causing additional crystals to form.