Heat! lots of it to melt the sand which is simply silicon dioxide. It melts at 3100F and becomes a liquid, Then some of the universe's magic happens and when it cools down and hardens, the molecules do a jig to change formation and become transparent.
Thats it! of course during industrial processes they add various things like boron oxide to make it more heat resistant and for general glass, add soda and limestone to stop it melting in water. For stronger glass, its laminated into layers.
We must all recycle glass as much as possible because its so easy to melt down and re-use and the world is sadly running out of sand which is probably one of the most useful substances found on the planet, how could you build anything without sand?
Last little fact. When the first nuclear bombs were being tested, so much heat was being generated that the desert sand turned into glass!
Great question and for more detail of turning glass backin to sand written by the pros, go take a look here!
Short Answer will be by mixing sand with soda ash (sodium carbonate) and limestone (calcium carbonate) and heated in an extremely high temperature or a furnace.
"The soda reduces the sand's melting point, which helps to save energy during manufacture, but it has an unfortunate drawback: it produces a kind of glass that would dissolve in water! The limestone is added to stop that happening. The end-product is called soda-lime-silica glass. It's the ordinary glass we can see all around us."
I'm no expert on this topic but the link above explained it pretty well.