Quartz and Glass
Quartz is one of the most abundant compounds in the Earth's crust. In pure form it has the simple formula SiO2, but that formula can be misleading. Unlike CO2 which is a small molecule, SiO2 forms a network solid crystal with each atom bonded to its neighbors.
Specifically, each silicon atom is bonded to 4 oxygen atoms. It would, therefore, seem that the formula should be SiO4, but each oxygen is bonded to another silicon as well. As a result, each silicon really only "has" half of each oxygen. So each silicon has 4 half oxygens, which leads to the formula SiO2.
The crystal structure can be seen here, with the black circles representing silicon atoms and the red circles representing oxygen atoms.
All gemstones and most minerals are network solids but quartz has a special property that can be seen when quartz is subjected to high heat.
Melting for molecular solids involves breaking intermolecular attractions, as does melting ionic soids, but melting network solids requires us to break covalent bonds. When a network solid is heated enough, bonds begin to break, however they don't all break at the same time. This means that the crystal is partially, but not completely, disrupted. With bonds broken, the tetrahedral angles are no longer rigidly held in place and the atoms can begin to move relative to each other. At this point the quartz becomes a very think liquid. If this liquid is cooled, the atoms will slow down and will be unable to move to any great extent. However, at least some of them will not rebond (having shifted too far to reconnect with the atoms with which they were previously bonded). The result is a stiffening of the liquid into a clear substance that we call glass.
Thus, glass is just melted and cooled quartz. What is interesting to note about glass, however, is that it fails many of the standards that we set for solids. Because the atoms have shifted in unpredictable and inconsistent ways from the original crystal, there is no specific crystalline structure to glass. In addition, because some bonds remain "broken" and others are not, it does not stop flowing entirely. In simpler terms, if you left a glass out on the table for several million years and then (somehow) returned, you would find a puddle of glass (although the puddle would be just as hard as the drinking glass was and would seem to maintain its shape). Lastly, because the bonds are now inconsistent, there is no temperature at which glass "melts." Instead, glass gradually softens and begins to flow more freely. For these reasons, glass can be considered a liquid, not a solid.
Some people are uncomfortable calling something that doesn't take the shape of its container (at least during a human lifetime) and that can be shattered a liquid. For this reason, glass is sometimes referred to as an amorphous liquid.
it should also be noted that this tendency of glass to flow (to move, albeit very slowly) is sometimes credited with causing the imprefections in old windows. This was shown to be false. The rate at which glass flows would require thousands of years to produce such imprefections. Instead, it appears that these imprefections are due to the imperfect process by which glass window panes were made in the past.