Black holes are generally formed from the remnants of a massive star that has ended its life cycle. When a star exhausts its nuclear fuel, it undergoes a supernova explosion, and the core collapses under the force of its own gravity. If the core's mass is above a certain limit, it will continue to collapse until it forms a black hole.