The pressure inside a white dwarf (a collapsed star) which remains in equiblirum with the gravitational attraction is the result of Pauli's exclusion principle, which states that two electrons cannot occupy the same quantum state at the same time. This principle gives rise to what is called electron degeneracy pressure and is what counteracts gravitational contraction. If the mass of the original star is greater than 1.4 solar masses (the Chandrasekhar limit), the electron degeneracy pressure will not be sufficient to counteract gravity, and the star will collapse further into either a neutron star or a black hole.