According to theory, there might be three types of black holes: stellar, supermassive, and miniature black holes – depending on their mass. These black holes would have formed in different ways.
Stellar black holes form when a massive star collapses. Supermassive black holes, which can have a mass equivalent to billions of suns, likely exist in the centers of most galaxies, including our own galaxy, the Milky Way. We don't know exactly how supermassive black holes form, but it's likely that they're a byproduct of galaxy formation. Because of their location in the centers of galaxies, close to many tightly packed stars and gas clouds, supermassive black holes continue to grow on a steady diet of matter.
No one has ever discovered a miniature black hole, which would have a mass much smaller than that of our Sun. But it's possible that miniature black holes could have formed shortly after the "Big Bang," which is thought to have started the universe 13.7 billion years ago. Very early in the life of the universe the rapid expansion of some matter might have compressed slower-moving matter enough to contract into black holes.
Another division separates black holes that spin (possess angular momentum) from those that don't spin.
HubbleSite and STScI are not responsible for content found outside of hubblesite.org and stsci.edu