A review is given of various theoretical approaches for the equation of state (EoS) of dense matter, relevant for the description of core-collapse supernovae, compact stars, and compact star mergers. The emphasis is put on models that are applicable to all of these scenarios. Such EoS models have to cover large ranges in baryon number density, temperature, and isospin asymmetry. The characteristics of matter change dramatically within these ranges, from a mixture of nucleons, nuclei, and electrons to uniform, strongly interacting matter containing nucleons, and possibly other particles such as hyperons or quarks. As the development of an EoS requires joint efforts from many directions, different theoretical approaches are considered and relevant experimental and observational constraints which provide insights for future research are discussed. Finally, results from applications of the discussed EoS models are summarized.