Light partly penetrates transparent objects and is partly reflected. Depending on the indexes of refraction of the two media. In your case light enters from above ( first medium) it goes through the glass, (second medium) and is also partially reflected back, and goes out to the air ( third medium).
There exists a critical angle with respect to the normal when there is total internal reflection, i.e. light does not go through the glass (your third medium). It follows Snell's law, where n1 and n2 are the indexes of refraction:

$n_1 sin \theta_i = n_2sin\theta_t$
to find the critical angle we set $\theta_t$= 90 degrees.
$\theta_c = \theta_i = arcsin \frac{n_2}{n_1},$
Have a look at the wikipedia articles on refraction and total reflection.