A black hole is the result of a massive star collapsing at the end of its lifecycle.
The core becomes unstable and gravitationally collapses inward upon itself, and the stars outer layers is blown away.
The crushing weight of the constituent matter falling from al sides compresses to a point of zero volume and infinite density.