Gravitational lensing was something predicted by Einstein’s theory of relativity long before it was actually observed, and the theory behind it goes something like this.
Light always travels in a straight line. A laser pointer always travels from the exit of the pointer straight to whatever you’re pointing it at, which is quite handy for things like presentations or laser assisted guides, if you’re trying to draw or cut straight lines. However, if we know anything about general relativity, it’s that the space light must travel through is not totally flat. Space is curved and warped by the presence of massive objects, which means that we have to amend our rule of how light travels to “light always travels in a locally straight line”. Whatever direction is “straight forward” at a given point in space is the direction that light will go. If you’re an external observer watching a beam of light, the path the light takes may appear to bend around a massive object as it encounters the curve in space caused by gravity. But if you could ask the light particle which direction it was going, it would always say “straight forward,” no matter how curvy its path had seemed to you.
Similar to the way that a magnifying lens changes the path of light and magnifies it, the results of the gravitational ‘lens’, as it is technically called, can distort the image of the background object and magnify it. If you have a look at the objects along the edge of a photo taken with a fisheye lens, you’ll notice that things that would be straight lines (like walls or trees) are bent into a curve - the light travelling through the lens was distorted as it passed through. The fun thing about our gravitational lens is that it means that we can spot objects that would have been too distant and faint to see without the magnification that the lens was able to provide.
Usually, the gravitational heavyweight that is bending the light from the object behind it is a cluster of galaxies, or something similarly hefty, like a black hole. Occasionally, a single massive galaxy can serve as a heavyweight. In order for the gravitational distortion caused by the heavy object to be observed to be functioning as a lens, it has to have another object pretty close to directly behind it, from our line of sight - you need light from the background object to pass very near to the distortion in space in order to have a noticeable bend to the path of the light.
If everything is very exactly lined up, then the light from the background object will pass around the heavy object in front of it in an even way, like water flowing over a sphere. So, as we see it, there would be a perfect ring of light from the background object (generally a galaxy) around the heavy front object. This is what’s called an Einstein ring, because it’s the ideal case of gravitational lensing, as predicted from Einstein’s theory.
Most of the time, the background object, the heavy lensing object, and we as observers are very slightly out of line. This means that light doesn’t pass around the heavy lensing object in an even way. More light will bend around one side, leaving an empty space on the other side. If the background object offset enough, you just wind up with multiple distorted images from the background object; they’ll just look a bit stretched, like the fisheye lens effect. This is what was behind the Space Invader galaxy that popped up a little while ago.
Usually, the background object behind the heavyweight is another older, more distant galaxy, and it’s the light from this galaxy that is sheared out and stretched like silly putty. The foreground gravitational weight really just has to stretch space for this to work; but if you want a perfect Einstein ring, you just have to cross your fingers and hope for a cosmic alignment.
Something here unclear, or make you curious? Have your own questions? Feel free to ask!