How does gravitational lensing occur?
Gravity affects light.
Gravitational lensing allows for the observing of a source of light that is not directly observable (it is blocked by some other object or material). Instead, the light emitted by the source is bent around an obstructing object due to gravitational interactions with other mass distributed through space.
The reason gravitational lensing occurs is that light is influenced by gravity. Light travels in a straight path, which can be influenced by gravitational fields produced by other masses along its trajectory. In this way, a source of light that is not typically visible along a straight line path can be revealed through a curved path.