Glass is generally made of three components: silica, in the form of sand; an alkali flux, such as soda or potash, which promotes fusion; and lime, which stabilizes the mixture.
In the process of being heated and then cooled, glass loses its crystalline nature and becomes an amorphous but rigid substance.
Like a solid, it is stiff enough to keep its shape.
But like a liquid, the spacing of its molecules is wide enough for the glass to be transparent.