In metal type, the point size (and hence the em, from em quadrat) was equal to the line height of the metal body from which the letter rises.
[…]
In some older texts, but not all, the em is defined, or said to have been defined, as the width of the capital ‘M’ in the current typeface and point size.
[…]
In [CSS] the em unit is the height of the font in nominal points or inches.
In digital type, the relationship of the height of particular letters to the em is arbitrarily set by the typeface designer.
However, as a very rough guideline, an “average” font might have a cap height of 70% of the em, and an x-height of 48% of the em.
– https://en.wikipedia.org/wiki/Em_(typography)
Font size of the parent, in the case of typographical properties like font-size, and font size of the element itself, in the case of other properties like width.
– MDN: CSS relative units