  We discuss the occurrence of gravitational phase transitions and
instabilities in a gas of self-gravitating fermions within the framework of
general relativity. In the classical (nondegenerate) limit, the system
undergoes a gravitational collapse at low energies $E<E_c$ and low temperatures
$T<T_c$. This is called "gravothermal catastrophe" in the microcanonical
ensemble and "isothermal collapse" in the canonical ensemble. When quantum
mechanics is taken into account and when the particle number is below the
Oppenheimer-Volkoff limit ($N<N_{\rm OV}$), complete gravitational collapse is
prevented by the Pauli exclusion principle. In that case, the Fermi gas
undergoes a gravitational phase transition from a gaseous phase to a condensed
phase. The condensed phase represents a compact object like a white dwarf, a
neutron star, or a dark matter fermion ball. When $N>N_{\rm OV}$, there can be
a subsequent gravitational collapse below a lower critical energy $E<E''_c$ or
a lower critical temperature $T<T'_c$ leading presumably to the formation of a
black hole. The evolution of the system is different in the microcanonical and
canonical ensembles. In the microcanonical ensemble, the system takes a
"core-halo" structure. The core consists in a compact quantum object or a black
hole while the hot halo is expelled at large distances. This is reminiscent of
the red giant structure of low-mass stars or the implosion-explosion of massive
stars (supernova). In the canonical ensemble, the system collapses as a whole
towards a compact object or a black hole. This is reminiscent of the implosion
of supermassive stars (hypernova).
