Statistical mechanics of disordered systems