Peaty-ness, or more accurately smokiness (the smoke comes from the burning of peat as a fuel source to heat to dry the barley), is measured in parts per million (ppm) of phenols in the barley before it’s been milled.
What are phenols? It’s a class of chemicals, one of which is Phenol itself, that contribute the medicinal and peatyness.
It’s actually five phenols:
These chemicals are naturally occurring in peat.
Not being a scientist, I can’t say what contributes to what and to what extent but most people think cresol contributes the most. We think it’s medicinal because it’s used in disinfectants (it’s used to dissolve other chemicals), but those are the chemical compounds you’ll find in whisky (that is attributed to the peat).
Non-peated barley might have phenols of around half to 3 ppm. On the other end, Ardbeg will see around 50 ppm. Another familiar name is Laphroaig which starts at 40 ppm but ends up around 25 ppm. It’s estimated that 30-50% of the phenols make it into the final new make whisky.
If you want to find out more, this PDF does a great job explaining the whole process.