Devices based on the optical microcavities which confine light to small volumes by resonant recirculation are already indispensable for a wide range of studies and applications. This article provides an overview of the development and application of optical microcavities. We first give a pedagogical introduction to the interaction between a two-level system and a quantized electromagnetic field in the cavity, based on the so-called Jaynes-Cummings model, which is basic and important theory model in the cavity quantum electrodynamics, and various quantum phenomena and applications of it. Then, we overview three basic types of the microcavity structures, and also highlight the progress achieved so far in these systems. Based on these three structures, we give an account of three representative applications of optical microcavities, and explain their microcavity requirements and the state of the art for these devices, before outlining the challenges for the future.