Non-Hermitian optics is a burgeoning field at the intersection of quantum physics, electrodynamics, and nanophotonics. It provides a new perspective of the role of gain and loss in optical systems. Leveraging the advanced designs inspired by non-Hermitian physics, classical optical platforms have been widely investigated to unveil novel physical concepts, such as parity-time symmetry and exceptional points, which have no counterparts in the conventional Hermitian settings. These investigations have yielded a plethora of new phenomena in optical wave scattering, optical sensing, and nonlinear optical processes. Non-Hermitian effects also have a profound impact on the lasing behaviors in the semiclassical framework of lasers, allowing for novel ways to engineer single-mode lasers, chiral laser emission, laser noise, linewidth, etc. Furthermore, over recent years, there has been increasing interest in the explorations of non-Hermitian physics in quantum optics, which addresses photon statistics, entanglement, decoherence, and quantum sensing in non-Hermitian systems. In this review, we review the most recent theoretical and experimental advances in non-Hermitian optics and photonics, covering the significant progress in both classical and quantum optics regimes.