We review in detail the Batalin–Vilkovisky formalism for Lagrangian field theories and its mathematical foundations with an emphasis on higher algebraic structures and classical field theories. In particular, we show how a field theory gives rise to an L∞‐algebra and how quasi‐isomorphisms between L∞‐algebras correspond to classical equivalences of field theories. A few experts may be familiar with parts of our discussion, however, the material is presented from the perspective of a very general notion of a gauge theory. We also make a number of new observations and present some new results. Most importantly, we discuss in great detail higher (categorified) Chern–Simons theories and give some useful shortcuts in usually rather involved comp...