How does the Pauli exclusion principle create a force in degenerate matter?
How does the Pauli Exclusion Principle actually create a force?
The Pauli exclusion principle doesn't really say that two fermions can't be in the same place. It's both stronger and weaker than that. It says that they can't be in the same state, i.e., if they're standing waves, two of them can't have the same standing wave pattern. But for bulk matter, for our purposes, it becomes a decent approximation to treat the exclusion principle as saying that if $n$ particles are confined to a volume $V$, they must each be confined to a space of about $V/n$. Since volume goes like length cubed, this means that their wavelengths must be $\lesssim (V/n)^{1/3}$. As $V$ shrinks, this maximum wavelength shrinks as well, and the de Broglie relation then tells us that the momentum goes up. The increased momentum shows up as a pressure, just as it would if you increased the momenta of all the molecules in a sample of air. A degenerate body like a neutron star or white dwarf is in a state where this pressure is in equilibrium with gravity.
I like Ben's answer, but here is my take on this.
Degeneracy pressure is not due to a fundamental force; in fact in the simplest model, it occurs in ideal gases of non-interacting fermions.
The simple quantum mechanics of particles in an infinite potential well (i.e. trapped in a volume) tells us that only certain quantised wavefunctions are possible. Each of these wavefunctions has a momentum associated with it. Hence there are a finite number of quantum states per unit volume, per unit momentum (sometimes called "phase space"). The Pauli exclusion principle (PEP) tells us that only two (one for spin-up, one for spin-down) fermions could occupy each of these "momentum eigenstates".
In a "normal" (non-quantum) gas, what happens when we squeeze it into a small volume? Well, kinetic theory tells us that the pressure increases because the number density of particles increases and the temperature increases which is manifested as an increase in the speeds and momenta of the particles. These faster particles exchange larger quantities of momentum with the walls of our container, hence exert a larger pressure. But, in our "normal" gas, we could put it in a refrigerator and reduce the pressure. This is because particles in a normal gas can have their kinetic energy extracted from them and they can fall to occupy lower energy/momentum states without restriction.
Now turn to a gas of fermions. Pressure is exerted in a fermion gas in exactly the same way. The kinetic theory picture holds. But now if we cool the gas, initially the behaviour might be quite similar, but as all the low energy/momentum quantum states become filled up, we find that the PEP prevents us extracting any more heat from the particles. They settle into quantum states that may have an appreciable amount of momentum and kinetic energy, because that's as low as they can go. So, even if we were to cool our fermion gas to close-to-absolute zero, we would still find fermions with non-zero momentum and the gas would exert a (degeneracy) pressure.
A simple way of looking at this is as a 3-D version of the uncertainty principle. $$ (\Delta x \Delta p_x) (\Delta y \Delta p_y) (\Delta z \Delta p_z) = \Delta V (\Delta p)^3 \sim \hbar^3$$ This relationship tells you that particles can be packed tightly together but if they are, then they must have very different momenta. This large range of momenta is what leads to degeneracy pressure.
The extreme case is known as complete degeneracy and is a good approximation for ideal fermion gases at either very low temperature or very high densities. In this case all the momentum states are completely filled right up to something called the Fermi energy and no higher energy states are occupied at all. This gas exerts a degeneracy pressure that is independent of temperature.
The rest is the Maths of calculating: (i) the density of quantum states; (ii) when degeneracy becomes important; (iii) what pressure is exerted by a degenerate gas using kinetic theory. It turns out that White Dwarf stars are almost entirely supported by the degeneracy pressure of electrons at densities of $10^{9}-10^{11}$ kg/m$^{3}$ and the approximation of complete degeneracy is very good, even though their internal temperatures may reach $10^{7}$ K. At the higher end of this range, the electrons in the White Dwarf are relativistic. (See this Geogebra applet that I created to see how the occupation of quantum states varies with density and temperature in a white dwarf). Because neutrons are much more massive than electrons, they do not become degenerate until much higher densities (that maths shows it goes roughly as the cube of the fermion mass). Neutron stars are partly supported by neutron degeneracy pressure at densities of $10^{17}-10^{18}$ kg/m$^{3}$.
The force we associate with the Pauli exclusion principle is not a fundamental force, connected with the four fundamental interaction, but rather an entropic force, a consequence of the limitations the principle puts on allowed wave functions.
A more general statement of the principle states the the total wavefunction of a system of two (or more ) identical fermions is antisymmetric under exchange of two particles. So, if two atoms, carrying electrons with the same spin, get nearer, the spatial part of the wave function has to be antisymmetric. As you know, the probability distribution of the position of the electron is the square of the amplitude of the wave function and thus for an electron with an antisymmetric wave function will avoid the space between the atoms. This phenomenom is related to the exchange interaction
Because of this, the phase-space of the electrons in a high-density solid will be restricted, a restriction which we perceive on a macroscopic scale as a "force".