A common misconsception suggests that glass is a liquid of high viscosity. This not the case. Glass is its own distinct state of matter that doesn't coincide with any other classical one. Every liquid (except Helium) can be turned into glass, if a sufficiently rapid cooling takes place. This process is called vitrification. When a liquid is cooled (water for example) it normally goes through the process of crystallization. We say that the water is frozen as ice forms which has a very specific structure that is characterized by its stability (crystalline solid). If the cooling happens quickly enough, the water molecules don't have the opportunity to occupy the lowest energy sites and this is how the amorphous solids forms.
Annealing illustrates this phenomenon. When glass is cooled down in order to solidify, this process must be done during a specific time interval in order for the molecules to have enough time to position themselves in a more stable manner. If during the glass making process, the produced glass has been solidified too rapidly, then the stress present in the solid makes it too fragile to the point where it can rupture/shatter even during handling. By reheating the glass and slowly droping the temperature again, we ensure that the glass object has gained a much more stable structure.
As crystalline solids have a melting point, amorphous ones have a glass transition temperature which surprisingly depends on thermal history (how rapidly was the former liquid made into glass?). Around this temperature point, the viscosity of the glass increases rapidly and can be classified as a solid (under classical terms). It should be noted that the viscosity as well as other properties of the substance made into glass, present a continuous change as the temperature changes. This is not the case with "ordinary" freezing as liquid water turns spontaneously into a solid in a discontinuous manner (during the freezing process the temperature stays constant. Immediately below all the water has turned into ice).
The glass state is metastable and its transition to a crystalline solid is thermodynamically favoured although kinetically inert.