Notes of the lectures delivered in Les Houches during the Summer School on Complex Systems (July 2006).