While playing your headphones at high volumes, the driver's diaphragm may not function at a fast pace as required, leading to some amount of distortion making sounds on the lines of static or any kind of cracking noise, affecting the musical quality of your audio file.
Headphones with a high percentage of total harmonic distortion, have more chances of easily distorting. So, look for a set of headphones with as low a total harmonic distortion (or THD) level as possible. Most popular manufacturers’ headphones have total harmonic distortion levels below one per cent, while high-end headphones have distortion levels below 0.1 per cent.
However quoted THD levels of "less than 1 percent" aren't helpful in predicting sound quality of a headphone. You can judge so only by listening to basic instrumental tracks to assess the distortion of one set of headphones versus another.