Quantum mechanical effects at the macroscopic level were first explored in Josephson junction-based superconducting circuits in the 1980s. In the last twenty years, the emergence of quantum information science has intensified research toward using these circuits as qubits in quantum information processors. The realization that superconducting qubits can be made to strongly and controllably interact with microwave photons, the quantized electromagnetic fields stored in superconducting circuits, led to the creation of the field of circuit quantum electrodynamics (QED), the topic of this review. While atomic cavity QED inspired many of the early developments of circuit QED, the latter has now become an independent and thriving field of research in its own right. Circuit QED allows the study and control of light-matter interaction at the quantum level in unprecedented detail. It also plays an essential role in all current approaches to quantum information processing with superconducting circuits. In addition, circuit QED enables the study of hybrid quantum systems interacting with microwave photons. Here, we review the coherent coupling of superconducting qubits to microwave photons in high-quality oscillators focussing on the physics of the Jaynes-Cummings model, its dispersive limit, and the different regimes of light-matter interaction in this system. We discuss coupling of superconducting circuits to their environment, which is necessary for coherent control and measurements in circuit QED, but which also invariably leads to decoherence. Dispersive qubit readout, a central ingredient in almost all circuit QED experiments, is also described. Following an introduction to these fundamental concepts that are at the heart of circuit QED, we discuss important use cases of these ideas in quantum information processing and in quantum optics.