Confinement and manipulation of photons using microcavities have triggered intense research interest in both fundamental and applied photonics for more than two decades. Prominent examples are ultrahigh-Q whispering gallery microcavities which confine photons by means of continuous total internal reflection along a curved and smooth surface. The long photon lifetime, strong field confinement, and in-plane emission characteristics make them promising candidates for enhancing light-matter interactions on a chip. In the first part of this talk, I will introduce some representative photonics applications of ultrahigh-Q microcavities. In the second part, I will focus on (1) chaos-assisted momentum transformation in an asymmetrical microcavity, (2) spontaneous symmetry breaking of optical fields in a single ultrahigh-Q microcavity, and (3) second-order nonlinear optics induced by symmetry breaking at the surface of a silica microcavity under a sub-milliwatt continuous-wave pump. By dynamically coordinating the double-resonance phase matching, a second harmonic is achieved with a conversion efficiency of 0.049% W^−1, 14 orders of magnitude higher than that of the non-enhancement case.