As you say, photons do not have rest mass, so their rest energy is zero. However, photons have momentum $p$, which means they have energy $E = hc/\lambda = p/c$ (using the de Broglie relation) where $c$ is the speed of light. In special relativity, there's no gravity, and massless particles, i.e. photon, travel along null geodesics, which defines the lightcone for each event in spacetime. General Relativity (GR) subsumes special relativity through the equivalence of inertia and gravity, since the free-fall equation is the geodesic equation. Light still travels along null geodesics, but these trajectories are "bent" in the presence of gravity. For example, measuring the bending of light from the sun around the moon in during solar eclipse was one of the first experimental validations of predictions of GR.
A black hole (BH) is a prediction of GR, that is, a BH is a solution to Einstein's field equations. Non-rotating and electrically neutral BHs are modeled (uniquely) by the Schwarzschild solution, which assumes spacetime is empty and has spherical symmetry - this symmetry enforces a physical singularity at $r = 0$ where $r$ is the Schwarzschild radial coordinate, parameterized by a quantity $m$ located at $r = 0$ called the mass of the BH.
Saying that "a black hole is where light cannot escape" is, I think, bordernline too simplistic. Perhaps a better description of the weirdness of BHs: consider two observers, A is at infinity (very far away) watching B fall radially toward a BH. From the perspective of B, B just falls into the BH after passing the event horizon (the surface on which the escape velocity equals the speed of light in vacuum $c$). Observer A never sees B pass the event horizon, because as B moves from the horizon toward the physical singularity at $r = 0$ it takes infinite amount of time for information to escape from within the horizon. Thus, observer A sees observer B take infinite amount of time to pass the event horizon of the BH, even though B has already been passed the event horizon. This is an example of loss of simultaneity, which you encounter in intro to special relativity before studying BHs. It is not an illusion - it's a real, physical difference in the ability to measure events due to the presence of gravity and relative motion.
Therefore, if observer B is infalling while shining a flashlight back towards observer A, then after B passes the event horizon the light will be redshifted infinitely relative to A. This is what Hawking means by "not even light may escape" the BHs event horizon - the light from B is stretched in wavelength infinitely at the event horizon (the surface on which the escape velocity of the BH is equal to the speed of light) relative to A. Another way to say it:
From the perspective of an observer stationed outside of the hole (and safe from harm, we hope), General Relativity teaches that a clock dropped into the hole will appear to run slower and slower as it approaches the event horizon. The time between each "tick" (as measured by a clock local to the observer) will increase without limit, approaching infinity as the clock approaches the event horizon. The "last tick" before the clock drops into the hole will never be observed in finite time. The clock will always appear inside the known universe and outside the hole.
The notion of "ripping a hole in spacetime" is different from a black hole, e.g. see J. Rennie's answer here. A black hole can be thought of as a region of space where density is infinite: i.e. for a finite mass, the volume goes to zero. But even this simple view gets into trouble when one begins to examine the BH solutions of the EFEs.
BH masses have been experimentally constrained by observations of accretion flows in X-ray binaries with stellar-mass BHs and by gravitational-wave detections from stellar-mass binary-BH mergers ($5 \lesssim m \lesssim 100 M_{\odot}$), and by accretion-powered active-galactic nuclei and dynamically through effects on nearby stars and gas from super-massive BHs ($10^5 \lesssim m \lesssim 10^9 M_{\odot}$). This is a nice graphic. The first confident detection of an intermediate-mass BH, called GW190521, was achieved recently by LIGO/Virgo gravitational wave detection. Stellar mass black holes form as the end-products of stellar evolution, while the origin of super-massive black holes is less certain but thought to originate from "seeds." These astrophysical BHs, for various reasons, are expected to have spin and are modeled as Kerr BHs.