Black holes form when massive stars undergo gravitational collapse. Initially, these stars spend most of their lives in a stable phase, fusing hydrogen into helium. When they exhaust their nuclear fuel, they expand into red giants or supergiants. For stars with more than about 20 solar masses, this leads to a supernova explosion, ejecting the outer layers and leaving behind a dense core. This core continues to collapse under its own gravity until it reaches a point where not even light can escape, forming a black hole. The boundary beyond which nothing can escape is called the event horizon. Black holes are detected by their gravitational influence on nearby objects and the radiation emitted as they accrete matter. #cosmos_geeks