I am no engineer but what I understand is that impedance is exactly electrical resistance but more or less for a term for AC circuits/analogue devices.
Both inputs and outputs of a device has an impedance.
The impedance of a headphone denotes proportionally the maximum amplitude of a fixed signal that is transmitted to the headphones.
The amplitude of a signal relates to the power and thus volume.
Eg a device with 30mOhm of impedance will be significantly louder than a 39kOhm headphone given that the signal and amplifiers are the same.
Different amplifiers have different ranges of gain. The higher the maximum gain the more the amplifier can βamplifyβ a signal. I think on data sheets they will make it simple and just state what ranges of impedance an amp is rated for.