When a star collapses into a neutron star, the process is driven by the intense gravitational forces overcoming the electron degeneracy pressure that supports the star's structure. During the collapse, the protons and electrons in the stellar material combine to form neutrons and neutrinos through a process called neutronization.
Under normal conditions, protons and electrons repel each other due to their electric charges. However, when the matter becomes extremely dense, such as in the core of a collapsing star, the gravitational force overcomes this electrostatic repulsion, causing protons and electrons to merge through the weak nuclear force. This process transforms protons into neutrons, releasing neutrinos in the process.
As the collapse progresses, the matter becomes so dense that it reaches a state called neutron degeneracy, where the neutrons themselves are subject to degeneracy pressure, supporting the neutron star against further gravitational collapse. Neutron degeneracy pressure arises from the Pauli exclusion principle, which states that no two fermions (such as neutrons) can occupy the same quantum state simultaneously.
In a neutron star, the extreme density and pressure cause the majority of the particles to be neutrons. However, it's important to note that there are still a small number of protons and electrons present in the form of a neutron star. These protons and electrons are thought to form a thin outer layer called the neutron star crust. The crust is less dense than the core and contains a mixture of ions, electrons, and a small number of free neutrons.