What causes a supernova?
When a star can no longer fuse elements in the core
When a star can no longer produce energy after a lot of iron builds up in the core, gravity causes the star's mass to collapse in on itself
When a star runs out of nuclear fuel.
A black hole works like a vacuum, only using gravity instead of suction. However, a black hole is formed when a very large star dies and goes supernova. Meaning it runs out of nuclear fuel (gases) and explodes (for lack of better word) before collapsing and consuming itself until it's the size of a pin head.
Although it is now the size of a pin head it retains it former mass. Which is quite large considering the size of most stars. During a star's lifetime it's gravity and pressure are balanced out by its mass. However, when a star collapses gravity gets the upper hand and forces the star to collapse under its own weight. When this happens the core compacts into such a small size it has practically no volume, but infinite density. Because of this, the black hole starts to consume light. Meaning that the surrounding area becomes a cesspit of darkness that nothing can see through.
It would also require a speed greater than light to escape the gravity. As no object can reach this speed anything that passes into the gravitational field will be trapped forever.
(Copied from my answer to- If we could send a camera into a black hole, what would we see?)
(I don't think that this photo is genuine but it sure looks amazing)
A supernova occurs when a large runs out a fusible material in its core.
Fusion reactions occur in the cores of stars where the temperatures and pressures are high enough for fusion reactions to occur.
When a large star which is over about 8 solar masses runs out of Hydrogen in its core, it seamlessly starts Helium fusion. This process continues with progressively heavier elements being fused until the core is mainly Iron.
Unlike fusion reactions involving lighter elements, fusing Iron and heavier elements requires more energy than is produced. When the core is mainly iron fusion reactions stop.
Stars which have fusion reactions happening in their cores are in hydrostatic equilibrium. This means that gravity which is trying to collapse the core is balanced by the outward pressure from fusion reactions. When fusion reactions top gravity takes over and the core starts to collapse.
It the core is less than about 1.4 solar masses the collapse is stopped by a quantum effect called electron degeneracy pressure. If it is heavier, gravity overcomes electron degeneracy pressure and the core collapses into a neutron star or a black hole.
The final core collapse releases a lot of energy which starts fusion reactions in the layers surrounding the core. These fusion reactions consume much of the material in a short time. The huge amount of energy released causes a massive explosion. This is a supernova.