Wireless headphones might be temptingly convenient, but you can get background hissing and/or dynamic range compression that flattens the sound to some extent, and you're likely to run into interference from other devices. If you decide to get wireless headphones, though, look for digital models with maximum hertz and multiple channels so you can switch to another frequency if you encounter interference.
If you listen to mp3s below 192 kbps regularly, high quality headphones will be a waste of money as you're trying to listen to detail that isn't there. mp3s compress the music into a smaller file by getting rid of some of the track.
If you're always using your mp3 player in a pocket up near your chest, you won't need a 10-foot cord. If you like to listen to music from your stereo using headphones you won't want a 2-foot cord. There is a way to shorten the cord length by a little bit so you don't have excess getting caught on things and some headphones with really long cords come with cord-winders or you can even make your own cord-winder. Generally, having it a bit too long is better than having to buy an extender.
Research. Don't go to sources like Consumer Reports that aren't specialized in audio. Go to audiophile forums (AVSForum, Head-Fi, etc.) and shops to find what's good instead of going to general electronics stores.
If you get good quality headphones, you don't have to get an extended warranty. Just stick with what's given to you. Some headphone brands, such as Skullcandy, give out lifetime warranties for their products. Although if you know you'll be using them all the time, a warranty wouldn't be a terrible idea.
Be careful with earbuds. Some break or snap very easily and if you go for the cheaper ones, they lose their sound after about a year.
As a general rule, you do get what you pay for. But this is not always the case. Some headphone brands overprice their headphones because they look cool or are popular. But the sound on these headphones can be terrible. Always do your research and test out possible headphones.
When you first put your headphones on don't forget to turn the volume down.
Once you buy quality headphones, you'll find that you can't go back to your old $20 headphones. You'll be disappointed by the sound and feel.
One of the biggest challenges is to find right headphones for gym use. Gyms are notorious - and very annoying - about rather loud volume and poor music choices. Headphones are just too bulky and awkward; most earbuds do not do much to cancel outside music. Do a lot of research before you buy something, mainly through user reviews. Some stores will let you try headphones on, but only online research and real life users will let you know about earbuds. Active noise cancellation earbuds have a reputation of creating interferences and noises from electronics operation. Passive (tight fit) earbuds do not, but not everyone likes "plugs" in the ear canals. And it can be quite a strange experience to listen to one's heartbeat and breathing, amplified with those.
Some people do get headaches from heavy headphones. This might be caused by poor fit/construction to begin with or simply listening to music at too high a volume.
Be especially careful with noise-reduction headphones (headphones in general) while driving, riding a bike, or even walking in the streets. Besides the desired distraction music might provide, you may miss early warnings of upcoming danger.
It is generally unsafe to use headphones for a long time, as pressure waves travel directly to the eardrum, causing accumulative long-term hearing loss. Limit volume and take frequent breaks.