Bullet proof glass is usually made out of two layers of glass with a sheet of clear plastic between. If a bullet hits the glass, it will break the glass on that side. As it breaks, it spreads the impact over a wide area of the plastic. The plastic is not brittle like glass, so it deforms, absorbing the impact, and with luck there's not enough "oomph" left for the bullet to make it through to the other side.
This sort of layering of stiffer and less stiff materials (plywood is an example) is very popular for making strong objects. The layers make it hard for cracks (or bullets) to go straight through as the energy can spread.
As you might imagine, wherever a bullet has hit once, it will be a lot easier for a second bullet to get through, so it's probably best to think of "bulletproof" glass as really being "bullet-resistant."
Shooting from close up will only help to the degree that a bullet fired from close range will be going a little bit faster, but it's not likely to be a big effect.
By the way, there's a huge difference between "bulletproof" glass and "safety glass." Safety glass is made so it will fall to little pieces when struck hard enough, and it does not offer any protection against bullets.
Dr. Knowledge is written by physicists Stephen Reucroft and John Swain of Northeastern University. E-mail questions to email@example.com or write Dr. Knowledge, c/o The Boston Globe, PO Box 55819, Boston, MA 02205-5819.