Statistical physics of the glass phase