The quantum Rabi model, involving a two-level system and a bosonic field mode, is arguably the simplest and most fundamental model describing quantum light-matter interactions. Historically, due to the restricted parameter regimes of natural light-matter processes, the richness of this model has been elusive in the lab. Here, we experimentally realize a quantum simulation of the quantum Rabi model in a single trapped ion, where the coupling strength between the simulated light mode and atom can be tuned at will. The versatility of the demonstrated quantum simulator enables us to experimentally explore the quantum Rabi model in detail, including a wide range of otherwise unaccessible phenomena, as those happening in the ultrastrong and deep strong-coupling regimes. In this sense, we are able to adiabatically generate the ground state of the quantum Rabi model in the deep strong-coupling regime, where we are able to detect the nontrivial entanglement between the bosonic field mode and the two-level system. Moreover, we observe the breakdown of the rotating-wave approximation when the coupling strength is increased, and the generation of phonon wave packets that bounce back and forth when the coupling reaches the deep strongcoupling regime. Finally, we also measure the energy spectrum of the quantum Rabi model in the ultrastrong-coupling regime.