Microlensing is a gravitational lensing effect where a massive object, such as a star or planet, passes between an observer and a distant light source, temporarily magnifying the light from the source. This phenomenon is used to detect objects that emit little or no light, such as dark matter and exoplanets.