Karl Schwarzschild crafted the first exact solution to Einstein’s equations of general relativity. He found that as gravity increased around an object, there must be a point where even light could not escape.
He theorized black holes. Stars are in a balance between gravity trying to collapse it inward, and energy of fusion in its core which pushes outward. But when large stars run out of fuel, gravity causes it to collapse. If the star is massive enough, this results in a supernova. A black hole remains in the center of the debris, if the collapsed core has a mass of 2 to 3 times the mass of our sun.
In a Black Hole, General relativity says all its mass is collapsed into an infinitesimally small volume, called a singularity. A singularity has all its mass in zero volume of space, thus it has infinite density. But infinities usually mean errors in math, so singularities may not be real.