I is caused by medium sized stars that have spent all of their nuclear fuel and have become what is called a white dwarf star. When a star shine normally, there are nuclear reactions taking place inside the star that give off a flow of high energy particles towards the outer layers of the star. These high energy particles speeding in all directions form a pressure on the outer layers of the star keeping it from contracting further under the influence of gravity. But when the nuclear material is used up, then there is nothing from keeping the star from collapsing under its own weight. As you might recall, atoms are made of negatively charged electrons circling positively charge atomic nuclei.
Opposite charges attract each other.
Whereas like charges repel each other. So each positively charged atomic nuclei repels other positively charged nuclei. But when the force of gravity is so strong that it forces the like charged nuclei to become close enough, then each nuclei begins to feel the attractive strong nuclear force of the other nuclei. The strong nuclear force is always attractive and much stronger than the force of an electric field. But its influence is only felt when particles are very close together.