About glass?

how is glass made? like what do they turn the sand into glass? and how do they make nonshatter glass as opposed to the kind that shatters but wont fall out or the regular kind?