Under conditions at or near the surface, quartz is more stable than most other minerals and assumes a mostly passive role in the geological environment, and this is the reason why the billion years old quartz crystals from Brazil look just as fresh and new as Alpine rock crystals that formed "just" 10 million years ago.
But while it is chemically an almost inert and passive substance at the surface, quartz is a very active agent under conditions deep within the Earth's crust. Here, at higher temperatures and pressures, it participates in many complex chemical reactions during rock and mineral formation.
Hope this helps answer your question!