  We discuss the mean-field theory of spin-glass models with frustrated
long-range random spin exchange. We analyze the reasons for breakdown of the
simple mean-field theory of Sherrington and Kirkpatrick. We relate the
replica-symmetry breaking to ergodicity breaking and use the concept of real
replicas to restore thermodynamic homogeneity of the equilibrium free energy in
a replicated phase space. Embedded replications of the spin variables result in
a set of hierarchical free energies and overlap susceptibilities between
replica hierarchies as order parameters. The limit to infinite number of
replica hierarchies leads to the Parisi solution with a continuous
replica-symmetry breaking. We present a closed-form representation of the
Parisi mean-field theory that is independent from stability of solutions with
finite-many replica hierarchies. Hence, solutions with continuous and discrete
replica-symmetry breaking can coexist. We demonstrate the construction of the
spin-glass mean-field solutions via real replicas on three spin-glass models:
Ising, Potts and p-spin. An asymptotic expansion in each model is used to
demonstrate various types of the transition from the paramagnetic to the glassy
phase.
