When a massive star runs out of hydrogen fuel, it begins to collapse in on itself, creating immense heat and pressure. If the core is large enough, its gravity becomes so strong that nothing, not even light, can escape, forming a black hole. Black holes are difficult to detect but distort spacetime so greatly that objects near them would be stretched out in a process called spaghettification. Anything passing the black hole's event horizon would be crushed to infinite density and trapped forever within the black hole. Supernovas occur when extremely massive stars explode at the end of their life cycles, ejecting heavy elements that can seed the formation of new stars and planetary systems.