Quartz is a mineral, while granite is a rock made up of minerals. Only one of those minerals is quartz. Pure quartz is silicon dioxide and is hard and transparent, but impurities can give it a range of colors.
Quartz is also the most common mineral found in the crust of the Earth and is found all over the world. It is not only found in igneous rocks, such as granite, but in metamorphic rocks and sedimentary rocks. Much of the sand found on the beaches of the world is made of quartz. Granite is the most common of the igneous rocks.