"When a massive star reaches the end of its nuclear life, it explodes as a supernova. The remaining core collapses on itself because there are more nuclear reactions to counteract gravity. Generally, the implosion of the core stops when the protons and electrons are combined with it are only neutron. One then finds a neutron star where gravity is supported by the nuclear force that prevents neutrons from interpenetration.
In some particular cases where the residual nucleus is massive enough, the nuclear force is not strong enough to counteract gravity. At this time, there is no strength to stop the collapse of the object itself. It shrinks until the escape velocity at the surface becomes equal to the speed of light (the escape velocity is the velocity that should be given to a body of a gravity so that it leaves another body).
When the escape velocity at the surface of the core is equal to the speed of light, nothing can leave the object because it is not possible to exceed the speed of light. In fact, even light can not leave. This is why the name, "black hole". It should be understood, however, that a black hole is not an infinite gravity: for example, if a star becomes a black hole, it does not attract more other bodies that were already in the vicinity. Only the black hole is much smaller than the original star, it is possible to get closer. If one gets too close and we enter inside the "event horizon" (where the escape velocity equals the speed of light), it can never emerge."