You measure your head where the hat's band would rest, then use a chart to find actual hat size. It appears to have at one point been the diameter of the circle in inches that has the same circumference at your head's (that is, your head measurement as above divided by pi), but there seems to be a little play in that these days. I don't know if due to shping and blocking or if the measurements just got sloppy over the years before they were redefined.

This page seems to have a good description along with a chart.
_________________________
Bitt Faulk