Imagine a bright object such as a star, a galaxy, or a quasar, that is very far away from Earth (say...10 billion light years).
For our discussion, let us imagine we have a quasar. If there is nothing
between it and us, we see one image of the quasar. Yet, if a massive galaxy (or cluster of galaxies) is blocking the direct view to the quasar, the light will be bent by the gravitational
field around the around the galaxy and we will see twin images of the quasar
[see Figure 1]. This is what is called "gravitational lensing," since the
intervening galaxy acts as a lens to focus the image of the distant quasar
to a new location. (Of course if the galaxy were perfectly symmetric with
respect to the line between the star and the Earth, then we would see a ring
of image stars!)
Now, if the massive galaxy is off-center (as might be expected)
with respect to the line between the quasar and the Earth, then the two light
paths would be different distances around the galaxy. This makes the twin
images be formed at different distances away from the actual quasar.
Finally, since the distances between each of the objects
is so great, the radius of the galaxy and the mass distribution of the galaxy
are well approximated by point masses (the error is small). Thus, one can
use simple geometry (knowing the mass of the galaxy, the distance of the
galaxy and the two images) to estimate the distance to the actual quasar.
As an example of what gravitationally lensed objects would look like, check
Hubble Space Telescope image below.