Glass is an amorphous arrangement of silicon and oxygen atoms. By "amorphous" we mean non-crystalline; the atoms are arranged more or less at random. This means that, on the microscopic level, there are huge variations in the strength of the glass at any given point.
The impact transfers energy (heat and kinetic) into the bonds between these atoms. Because some bonds are under more strain than others, some bonds will break while others do not. As the impact energy travels through the glass, weak bonds continue to shatter while strong bonds remain. If you watch a slow-motion video, you can usually see the cracks traveling and growing outward from the point of impact. The exact size of the pieces depends on the circumstances involved.