The imaging properties of optical microscopes are often compromised by aberrations that reduce image resolution and contrast. Adaptive optics technology has been employed in various systems to correct these aberrations and restore performance. This has required various departures from the traditional adaptive optics schemes that are used in astronomy. This review discusses the sources of aberrations, their effects and their correction with adaptive optics, particularly in confocal and two-photon microscopes. Different methods of wavefront sensing, indirect aberration measurement and aberration correction devices are discussed. Applications of adaptive optics in the related areas of optical data storage, optical tweezers and micro/nanofabrication are also reviewed.