Quartz is among the most widespread minerals, constituting 12% of the crust by volume.
Why is it so common? Because it is composed of oxygen and silicon which are by far the most important chemical elements in the crust. It contains no rare chemical elements which could limit its growth. Hence, we see it often in igneous rocks, especially those igenous rocks that contain lots of silicon (granite, rhyolite, pegmatite, granodiorite, etc.). The most important igneous rocks that contain little or no quartz are mafic/ultramafic (gabbro, basalt, peridotite) and feldspathoid-bearing rocks (nepheline syenite, for example, but such rocks are relatively rare).
Quartz resists weathering very well and it is also physically hard. Thus, we very often see it in sediments. It is the most important sand-forming mineral. It is more voluminous in sand than all other minerals combined. Continental sand is mostly composed of this mineral. Volcanic islands in the middle of oceans (Hawaii, The Canary Islands) are one of the few places where quartz is not among the sand-forming minerals because the generally basaltic volcanic material usually contains no quartz.
Quartz is also widespread in metamorphic rocks because it is not afraid of alteration, high temperature, and high pressure. sandstone becomes quartzite in the course of metamorphism. It should not come as a surprise that quartzite is composed of quartz just as sandstone. This is in stark contrast to pelitic (clay-rich) rocks which go through very complicated series of mineral reactions.
Quartz is also the most important vein mineral, filling cracks in the crust with many other and often economically important minerals. So, we have to conclude that quartz is especially tough mineral that can tolerate almost anything we can think of.
Quartz in sand is usually white or transparent and very often rounded because quartz grains might be very old, sometimes even billions of years. Quartz has no own specific color because it lacks chromophore elements. It could have almost any color, depending on impurities. Amethyst, for example, is a violet variety that contains small amount of iron. Quartz is often easy to identify in rocks because it lacks cleavage (no planar broken surfaces) and has specific greasy-looking luster. Note that crystal faces are different, they have vitreous (glassy) luster.

Quartz has no cleavage. Hence, it has a smooth conchoidal fracture and easily recognizable luster. Smoky quartz on the picture. Width of sample is 11 cm.

St. Peter Sandstone from the Ordovician Period is composed of almost pure and well-rounded quartz grains. Sand from this formation is widely used for fracking purposes. Width of view 20 mm.

Eolian sand from the Sahara (Erg Murzuk, Libya) is also composed of almost pure quartz. Grains have an orange hue because of very fine-grained hematitic pigment that covers them.

Weakly cemented Devonian sandstone outcrop in Estonia.

Vein quartz with pyrite from Witwatersrand, South Africa. Width of sample 12 cm.

Amethyst is a violet variety of quartz. Width of the crystal 55 mm.

Quartz crystals from Spain. Red color is given by hematite impurities inside the crystals. Width of view 40 mm.

Morion is a black variety of smoky quartz. This morion crystal is 12 cm in length and shows typical fracture of quartz.

Granite is a very common quartz-rich igneous rock. Width of sample 10 cm. Sample from Sweden.
Metamorphosed sandstone is named quartzite. It is composed of strongly fused quartz. Sample from Ireland.