We review the recent developments and the current status in the field of quantum-gas cavity QED. Since the first experimental demonstration of atomic self-ordering in a system composed of a Bose-Einstein condensate coupled to a quantized electromagnetic mode of a high-Q optical cavity, the field has rapidly evolved over the past decade. The composite quantum-gas-cavity systems offer the opportunity to implement, simulate, and experimentally test fundamental solid-state Hamiltonians, as well as to realize non-equilibrium many-body phenomena beyond conventional condensed-matter scenarios. This hinges on the unique possibility to design and control in open quantum environments photon-induced tunable-range interaction potentials for the atoms using tailored pump lasers and dynamic cavity fields. Notable examples range from Hubbard-like models with long-range interactions exhibiting a lattice-supersolid phase, over emergent magnetic orderings and quasicrystalline symmetries, to the appearance of dynamic gauge potentials and nonequilibrium topological phases. Experiments have managed to load spin-polarized as well as spinful quantum gases into various cavity geometries and engineer versatile tunablerange atomic interactions. This led to the experimental observation of spontaneous discrete and continuous symmetry breaking with the appearance of soft-modes as well as supersolidity, density and spin self-ordering, dynamic spin-orbit coupling, and non-equilibrium dynamical self-ordered phases among others. In addition, quantum-gas-cavity setups offer new platforms for quantum-enhanced measurements. In this review, starting from an introduction to basic models, we pedagogically summarize a broad range of theoretical developments and put them in perspective with the current and near future state-of-art experiments.