Black holes were predicted as an exact mathematical solution to Einstein's equations. Einstein's equations describe the shape of space around matter. The theory of general relativity connects the geometry or shape of shape to the detailed distribution of matter.
The black hole solution was found was by Karl Schwarzschild in 1915, and these regions — black holes — were found to distort space extremally and generate a puncture in the fabric of spacetime. It was unclear at the time if these corresponded to real objects in the universe. Over time, as other end products of stellar death were detected, namely, neutron stars seen as pulsars it became clear that black holes were real and ought to exist. The first detected black hole was Cygnus-X1.