Optical microcavities, usually made of transparent dielectrics, are architectures used for storing light. Similar to microcavities, optical nanocavities are nanostructures that can confine light within a deep-subwavelength volume. They are usually made of metals combined with transparent dielectrics. In the interaction with quantum systems such as atoms or molecules, microcavities enhance the strength of light-matter interaction via increasing the quality factor of the cavity, while nanocavities enhance the interaction by reducing the mode volume. The two kinds of cavities are distinctly different, but are related and can achieve similar functionality. Typically, microcavity systems have a longer lifetime (or coherence time) while nanocavities have the advantage of smaller dimensions, ultrafast response and room-temperature operation, which is more advantageous for potential applications in integrated optical circuits. Practically, both cavities have their own advantages, and complement each other.