If a massive object, such as a star, is squeezed into a small enough volume, its escape velocity will exceed the speed of light. Since nothing can go faster than light, nothing can escape the black hole. The earth would become a black hole if it were squeezed into a diameter of .7 inches, for example.