  These lecture notes focus on the mean field theory of spin glasses, with
particular emphasis on the presence of a very large number of metastable states
in these systems. This phenomenon, and some of its physical consequences, will
be discussed in details for fully-connected models and for models defined on
random lattices. This will be done using the replica and cavity methods.
  These notes have been prepared for a course of the PhD program in Statistical
Mechanics at SISSA, Trieste and at the University of Rome "Sapienza". Part of
the material is reprinted from other lecture notes, and when this is done a
reference is obviously provided to the original.
