Gravitational collapse is the shrinking of an object due to the force of gravity not being fully counteracted. An object in hydrostatic equilibrium is balancing the force of gravity with internal pressure. An object undoubtedly attained hydrostatic equilibrium through gravitational collapse, and if the pressure for some reason is reduced (slowly through cooling, or more quickly, as through the exhaustion of fuel for the fusion that maintains the internal temperature within stars), gravitational collapse will restart.
Gravitational collapse releases energy (gravitational collapse energy, via the Kelvin-Helmholtz mechanism), which used to be imagined as the source of the Sun's energy and is still considered an energy source during some phases of a star's lifetime, e.g., pre-main-sequence stars that have yet to trigger fusion. The energy can be determined through the virial theorem which states the balance between thermal/kinetic energy versus potential energy in a system in hydrostatic equilibrium.
Gravitational collapse energy is potentially extreme, e.g., in strong-field gravity. It is considered the energy source of active galactic nuclei/quasars, and is sizable in the formation of compact objects. It is often a natural candidate for the explanation of observed phenomena that imply huge amounts of energy expenditure.