Thanks to their improved realism, cosmological hydrodynamical simulations have become a central ingredient of studies of the formation and evolution of galaxies. They are also becoming crucial for the determination of cosmological parameters using a variety of observational probes of the large-scale structure of the matter distribution. I will provide a peek under the hood of the models, discuss strategies and challenges, and will present examples of physical insights that have recently been obtained.