Just one hundred years ago, in 1912, Albert Einstein predicted that stars would bend the paths of light in their neighborhood. And in 1919 a team lead by Arthur Eddington confirmed this effect with observations made during a solar eclipse expedition, thus providing confirmation of general relativity (which was published by Einstein in 1915). In 1936 Einstein wrote a paper that showed stars could act as lenses through this gravitational bending of light. The basic idea is that you have a foreground star (or it could as well be a galaxy) and a background star (or galaxy) along nearly the same line of sight.
The effect is much easier to observe with galaxies due to their large masses. As the light travels from the background (more distant) galaxy towards the Earth, it passes very near to the foreground (less distant) galaxy, whose gravitational field causes the light path to bend in accordance with the relativistic curvature of space-time in the neighborhood of the foreground galaxy.
The picture from the Hubble telescope is a very beautiful example of an Einstein ring that has a horseshoe shape. It’s nearly a complete ring, because of the very close alignment of the two galaxies along the line of sight. The foreground galaxy is a large red galaxy, with a mass about 10 times that of our own Milky Way galaxy, and the background source galaxy, whose image is distorted into a horseshoe shape surrounding the red galaxy, is blue in color.
The size of the ring depends on the square root of the mass of the foreground galaxy that acts as a lens. This includes both the ordinary matter and the dark matter associated with the galaxy. Einstein rings thus act as important probes of the distribution of dark matter in the universe.