Normal lenses such as the ones in a magnifying glass or a pair of spectacles work by bending light rays that pass through them in a process known as refraction, in order to focus the light somewhere (such as in your eye).
Gravitational lensing is an effect of Einstein’s theory of general relativity – simply put, mass bends light. The gravitational field of a massive object will extend far into space, and cause light rays passing close to that object (and thus through its gravitational field) to be bent and refocused somewhere else. The more massive the object, the stronger its gravitational field and hence the greater the bending of light rays – just like using denser materials to make optical lenses results in a greater amount of refraction.
Gravitational lensing happens on all scales – the gravitational field of galaxies and clusters of galaxies can lens light, but so can smaller objects such as stars and planets. Even the mass of our own bodies will lens light passing near us a tiny bit, although the effect is too small to ever measure.
So what are the effects of lensing?
The kind of lensing that cosmologists are interested in is apparent only on the largest scales – by looking at galaxies and clusters of galaxies. When astronomers take a telescope image of a part of the night sky, we can see many galaxies on that image. However, in between the Earth and those galaxies is a mysterious entity called dark matter. Dark matter is invisible, but it does have mass, making up around 85% of the mass of the Universe. This means that light rays coming towards us from distant galaxies will pass through the gravitational field of dark matter and hence will be bent by the lensing effect.It is the dark matter in the cluster that does almost all of the lensing as it outweighs regular matter by a factor of six or so.