  The effective field theory of cosmological perturbations stems from
considering a cosmological background solution as a state displaying
spontaneous breaking of time translations and (adiabatic) perturbations as the
related Nambu-Goldstone modes. With this insight, one can systematically
develop a theory for the cosmological perturbations during inflation and, with
minor modifications, also describe in full generality the gravitational
interactions of dark energy, which are relevant for late-time cosmology. The
formalism displays a unique set of Lagrangian operators containing an
increasing number of cosmological perturbations and derivatives. We give an
introductory description of the unitary gauge formalism for theories with
broken gauge symmetry---that allows to write down the most general
Lagrangian---and of the Stueckelberg "trick"---that allows to recover gauge
invariance and to make the scalar field explicit. We show how to apply this
formalism to gravity and cosmology and we reproduce the detailed analysis of
the action in the ADM variables. We also review some basic applications to
inflation and dark energy.
