Matter at room temperature and pressure is primarily bound together by electrostatic forces, this leads to the question : 'If atoms are attracted to each other what stops them from collapsing together?'. A repulsive force is needed, and the dominant one, particulary in highly dense matter is the electron degeneracy presure.
Electrons under the influence of an atomic nucleus have fairly well specified locations; the Heisenberg Uncertainty Principle states that its momentum must therefore be less well defined. One thing that is certain though; is that finding an electron with zero momentum is zero (as zero is a definite quantity, which the uncertaincy principle forbids). This constant movement of electrons creates a pressure.
With an ideal gas it's pressure can be approximated as P=nmv2 , where n is the number of particles, m is their mass and v is their velocity. If you look at the degeneracy pressure in solid hydrogen, the volume available to an electron, is not the whole volume, as the Pauli Exclusion Principle states that no two electrons can have the same state. Rather each electron is confined to a volume V/N, the volume of the atom.
me is the electrons mass, N the number of particles and V the volume
Taking all these facts together the pressure for a degenerate electron gas can be given as :-
Notice that temperature doesn't come into this at all, it's purely density that's important. At very high densities such as in a white dwarf star, this force is dominant, and prevents the star from collapsing further to a neutron star.
If the density becomes great enough, the electrons gain so much energy, that their velocity becomes near to the speed of light, then the above equation needs to be modified to take into account the theory of relativity.
Almost the same as the first, except the pressure is proportional to the 4 thirds power of the density.