How to obtain
1 Block of Sand will yield 4 blocks of Glass.
This does not require any crafting recipe to be unlocked. Simply carry Sand blocks with you, plus some Fuel and activate a Forge that has been placed into the game world by pointing your cursor at it and either clicking your right mouse button or pressing "f" as the default key. Then insert the Sand and Fuel.
Fuel comes in different levels/tiers that will either result in a slower or faster burning process. Both the forging times of one stack (4 blocks of Glass) as well as the total times for all units in the queue can be seen displayed in the forge window to the right side.
Fuel of level 1 (2 uncorrupted blocks of Wood, 4 uncorrupted blocks of tree Leaves, 2 Vines, 8 Wood Rods, 4 bushels of Tallgrass or other plants, but also many wooden blocks, furniture or objects etc.) will create 4 blocks of Glass in 10 seconds.
How to use
Crafting or taking Glass is one of the unlocking requirements for the crafting-recipe for Wood Windows.
Other than that, Glass blocks can also be put on display by placing them into the slots of display containers like Placemats, Stone Wall Shelves, Hidden Temple Altars, Galactic Grav-Chambers, Frozen Containers, Holiday Decorative Trees, Snow Buried Containers, Wood Planters, Flower Pots, Holiday Mantles or the like, where they will usually be reduced in size while on display.