it's part marketing and part science
The foam density is not in fact a weight but a measurement of mass per unit of volume and it is measured in kilograms per cubic meter (kg/m3)
Basically, the higher the density of foam, the greater level of impact resistance.
The impact resistance is the ability to push back against weight and prevent the foam from bottoming out.
On the surface, it seems straightforward. Higher density mats would resist stronger forces. However, this measurement is actually of the mat density, not of the forces that it opposes. A slab of granite will resist a lot of weight before bending, but does not make the best mat. More important, as also covered on that page, is elasticity/hardness, which appears to be measured in degrees, probably Shore hardness although they don't specify which scale is being used. That will measure how deep the mat will bend before resisting the full weight. Apparently, a good mat is somewhere in between 35 and 45 degrees. That creates a firm surface that is safe to walk on, but one that is yielding enough that it will reduce the force of impact when you fall on the mat.
TL;DR, measuring density is just a matter of dividing the mass by volume, but will probably not tell you all that much about mat suitability, and measuring Shore Hardness requires specialized instruments.