Paulis exclusion principal says that 2 fermions(matter particles) can’t be at the same place at the same time. When a particle from the fermion family gets cornered, like if you where to trap it in an ever shrinking box(the box is made up by Fermions so the particle and the particles making up the box can’t be at the same place at the same time), it would start to move fast and in an unpredictable fashion.
This is because the wave length(which corresponds to the energy of the particle, the lower wave length the higher energy and higher energy corresponds to faster motion) has to be a whole number of waves between the two walls of the box(meaning that it can’t have a 2.2, 3.3 wave waves, only 2, 3 e.t.c), and when the box shrinks the wave length also has to shrink and the particle gets a higher energy. The pressure form this motion in confined space is called degeneracy pressure. The same thing is true for the core of a star. If the star starts to shrink because of the gravitational Pressure, the particles inside it will react similar to the particles in a shrinking box and start to move around furiously. Thereby creating a degeneracy pressure which can actually hold the star up from collapsing under its gravitational pressure.