A black hole is formed when a massive star collapses under its own gravity at the end of its life. It creates a region of space where the gravitational pull is so strong that nothing, not even light, can escape. Black holes were first theorized in the 18th century and their existence was predicted by Einstein's theory of general relativity. They have been observed through their effects on nearby stars and gas and the emission of x-rays. Black holes come in different sizes, from stellar black holes formed by collapsed stars to supermassive black holes millions of times the sun's mass at the center of galaxies.