Electrons (as an example) experience Coulomb pressure (charge repulsion), but also a quantum statistical pressure called Fermi Degeneracy pressure related to their kinetic energy, AND ultimately the Pauli Exclusion Principle (Identical Fermions cannot occupy the same state, but higher momentum states take more energy to reach naturally so this creates resistance to collapse). If you want to learn more about this you can get a lot of mileage out of some reading on Fermi-Dirac statistics, the Pauli Exclusion Principle, and degeneracy pressure. Now this is just using electrons as a model, but ultimately all of the above can be overcome by gravity. When it does you still can't have electrons disobeying the rules, but the potential energy barrier to merge electrons and protons into neutrons is overcome. THEN you have neutron degeneracy pressure, and in theory after that you have a black hole (spacetime singularity surrounded by an event horizon.
However... that may not be the case. It is true that observation has confirmed the existence of objects that are so dense and massive they must have an event horizon, but beyond that we have no way of direct observation, right now (even in principle). A lot of people believe this indicates that a singularity doesn't really exist; it's the usual lesson when a singularity appears in your math: your math is wrong. In the end maybe there's another sort of degeneracy pressure from quarks or something even more fundamental like strings that ultimately prevents final collapse to a true singularity.
ed: typos