Measure of partial pressure on blood
In principle you could measure it by getting a sample of blood and putting it in contact with gaseous O2 at various pressures.   Whatever external pressure of O2 results in the amount of O2 dissolved in the blood neither increasing nor decreasing would equal p(O2) in the blood.

As for how it's actually measured, I believe the usual answer these days is spectroscopically.  That is, you shine light through a sample of blood and look for the absorption at certain frequencies which are typical of hemoglobin with O2 bound to it.  The amount of absorption is proportional to the concentration of oxygenated hemoglobin, and your software has some internal chart that converts that to partial pressure.

As for why it's measured that way, in part it's probably just tradition, and medicine changes very slowly and conservatively, for obvious reasons (you're experimenting with health and life).  In part, though, it may be that it directly relates to something important: the partial pressure of O2 in the atmosphere, which is about 160 mmHg.  That's the concentration of O2 in the lungs.  What fraction of that reaches the blood at various points in the circulation is a natural indicator of how well oxygen is being taken up, transported, and delivered.  That is, you can directly relate this particular measure of O2 concentration to the form of concentration usually used to describe a mixture of gases, in this case the air you breathe, which is the origin and destination of the blood gases.