  The goal of this chapter is to review the main ideas that underlie the cavity
method for disordered models defined on random graphs, as well as present some
of its outcomes, focusing on the random constraint satisfaction problems for
which it provided both a better understanding of the phase transitions they
undergo, and suggestions for the development of algorithms to solve them.
