Stars emit light in all directions. When we observe a distant star we only see the few rays of light from the star that are directed straight toward us. However, if a foreground star passes very close to our line of site of the more distant source star, the light from the distant background star will be gravitationally focused. To understand this idea, remember that we are the observer. The distant star is the source. The intervening star is the lens and it bends light from the source toward us. The two Figures below show the light path from a distant source star without and then with an intervening "lens" star.
Every object with mass has a gravitational field. We can think of objects with spherical symmetry, like stars or planets, as point sources. The strength of the gravitational field for a star is spherically symmetric. When we consider gravitational lensing, the relevant geometry is a slice through the sphere - a disk perpendicular to our line of site.
Qualitatively, the gravitational field at small radii on this disk (i.e., closest to the lensing object) is strongest and light from the source is bent so strongly that it converges closer to the lensing object and does not reach the observer. Likewise, the gravitational field is weakest at large radii on the disk and light from the source star focuses at distances beyond the observer. However, there is a ring on the disk where the bending of light from the source is "just right." Those rays of light from the source are brought to a focus at the position of the observer. This effect is called gravitational lensing and it was predicted in 1936 by Einstein. The ring of light that is focused at the position of the observer is given the special name of an Einstein ring.
Quantitatively, the size of the Einstein ring depends on the mass of the lens, the distance between the observer and the lens, DL, and the distance from the observer to the source, DS. Gravitational lensing occurs even if the lens star is too faint for us to see. Since most of the stars in galaxy are low mass, low luminosity M dwarf stars, this is often the case!
Since microlensing is an effect of gravity, it might seem like the amplitude of brightening will depend on the mass of the lens. While the mass of the lensing star determines the radius of the Einstein ring and the duration of the lensing event, the amplitude of brightening is most sensitive to something called the impact parameter. When the lensing object precisely lines up with our view to the source star, the impact parameter is zero and the magnification in brightness is a maximum. If the lensing object is not as tightly aligned with our view of the source - perhaps it just clips our view of the source star, then impact parameter is larger and the brightening of the source star (the "magnification") is not as strong. This is depicted in the figure below. The Einstein ring is represented by the dashed circle. The red, yellow, green and blue lines show the path that the lensing object travels with different offsets from precise alignment with our view of the source. The closer the alignment of the Einstein ring of the lens to our view of the source, the stronger the magnification that we observe. Gravitational lensing from objects as massive as stars typically last for several days.
The physical radius of the Einstein ring at the distance of the lens is described by the following equation:
where x = DL/DS.
Gravitational lensing generally refers to the bending of light from a background source by a foreground massive object. Gravitational microlensing is a special case where multiple lensing events occur from more than one foreground mass. If the lensing star happens to have orbiting planets that also cross our line of site to the source star, then a second microlensing event is superimposed during the brightening event. Because the mass of the orbiting planet is smaller than the mass of a star, the duration of the second microlensing event will be shorter, but since the alignment of the lensing planet is essentially the same as the alignment of the host star, the amplitude of the magnification will be the similar.