It is rigid like a solid, but its molecules are not arranged in repeating crystals. It is amorphous like a liquid. In fact, structurally there is no sharp line between a liquid and a glass. If you cool it fast enough, the molecules can't organize themselves into crystals. As the temperature drops, the liquid becomes more viscous and the molecules more sluggish.
Some liquids are easier to turn into glass than others, however.
The more viscous a liquid is at its freezing point, the more trouble the molecules will have moving into crystalline formation, and the more likely they are to end up a glass instead. Each molecule, says chemist Mark Ediger of the University of Wisconsin, is a long, awkward chain, and so liquid polystyrene is a tangled, viscous soup. Glass is the only solid state common polystyrene can have. But as a theoretical concept it might explain some of the properties of real glass. But the glass transition is different.