This bending of light is called "refraction". It happens when light passes from one medium into a different one where light has a different speed. In the case of the telescope eyepiece, or even your eyeglasses, it's when the light passes from the air into the glass.