Microlensing is a phenomenon in astronomy where the gravitational field of a massive object, such as a star or planet, acts as a lens to magnify the light from a more distant object. This can occur when the massive object passes directly in front of the background object, causing a temporary increase in brightness that can be detected and studied by astronomers. Microlensing is often used to study the distribution of dark matter in the universe, as well as to detect and characterize extrasolar planets. The technique has also been used to search for elusive objects such as primordial black holes and rogue planets.