From frequent bends, strong jerks and other mechanical loads, thin wires break or break. In this case, as a rule, one ear stops working, or, as in my case, both at once.
Sometimes the common wire breaks, in this case the sound is distorted beyond recognition: the high and middle frequencies disappear almost completely. This is due to the fact that the right and left amplifiers of the phone / player are turned on in antiphase and their output signals almost completely cancel each other out.
It also happens that the stereo effect simply disappears.
Often there is no sound in the ears, but the microphone works as if nothing had happened. However, if the microphone wire breaks, the control buttons on the headset cord stop working together with the microphone.
The most common cause of any described malfunction is in a broken wire in the immediate vicinity of the plug.
Sometimes wire damage is visible to the naked eye, but most often it is hidden under the insulation.
Now I will tell you how to fix vacuum earbuds with your own hands if the wire comes off the plug.
I will show the repair process using the example of the Monster Beats by dr Dre headphones, which I got along with the HTC Sensation XE phone. They served faithfully for almost 4 years, until, in the end, the plug broke.
The plug in these headphones is a regular mini-jack (3.5 mm) with four contacts - right ear, left ear, microphone and general. By the way, interestingly, this headset has buttons so that you can rewind songs back and forth, but there are no special contacts on the connector for them. All buttons use the same mic contact in some miraculous way.
In short, now I will try to repair these headphones at home, and if something goes wrong - and fix it with it! - I'll go buy new ones. Moreover, the choice today is simply huge. Moreover, I am far from being an audiophile and anybody will suit me as long as they are comfortable.
Headphones with a microphone and control buttons, so the plug has 4 contacts, and inside there are 5 wires. The headset connector is, of course, non-separable. 
As I said, this repair method is suitable only if the problem is precisely in the connector - one earpiece, the right or left ear, a microphone does not work, the buttons are not pressed, the sound disappears if you move the wire at the plug, etc. etc.
So, if you are firmly convinced that the headphone plug really needs to be replaced - let's move on.
In order for us to get the highest quality and super-creative plug that no one else has, we will need:
We will make an L-shaped plug, because it is better than straight line (more reliable and more compact). So let's go.
To begin with, we will make a small rig for the convenience of working with the sleeves, so that you can safely clamp them in a vice and at the same time not wrinkle or scratch.We take our piece of wood and drill a hole in it with a 9.5 mm drill, then we cut it with a hacksaw.
Since I had spent cartridges, there were dents on the primers from the striker. But we need everything to be beautiful, so we knock out both primers with an awl, hammer and straight hands: 
Then we straighten one of them with light blows from the inside with something suitable (I took the shank from a broken drill of a suitable diameter).
If your shells are brand new, not fired, then we knock out only the primer from one of them (you can throw it away right away, it will not be needed). Do not touch the second sleeve yet.
Then we clamp the sleeve without a primer in a vice and drill the bottom from the inside with a 7 mm drill. You need to drill so as to make the bottom of the sleeve as thin as possible. Those. the drill should be close to the primer hole (I've left about 0.5mm of headroom).
We carefully process the edges with sandpaper to get an even and strictly perpendicular cut to the axis of the sleeve.
It's time to tackle the old plug and wires.
To begin with, very carefully, using a sharp knife, we open the old connector to remove all unnecessary and leave only the plug itself with four contacts and soldered wires: 
We remember, or better write down, where which wire was soldered. My HTC headphones (with microphone) had the following pinout: 
We unsolder the old wires from the connector, strip the cable, tin the ends and fit a piece of heat shrinkage (diameter 2.5 mm, length 21 mm).
It would be nice to take an aspirin tablet to service the wires in lacquered insulation, but I didn't have one, so I got by with ordinary rosin. If you work with aspirin, then you should know - the fumes of this muck are terribly poisonous. You have been warned. 
We drill a hole of a suitable diameter in the wall of the sleeve. In my case, a 3 mm hole turned out to be ideal: 
We pass the cable through the hole and solder the headphone and microphone wires (in strict accordance with the pinout!): 
Then, to drive out all air bubbles, heat the mixture in a water bath to 80 degrees.
We fill our sleeve with the resulting composition to the brim, put everything in its place and, with the help of ingenuity and improvised devices, fix it all for at least 12 hours (or better for a day): 
When everything hardens, we take the structure into the light of day and get aesthetic pleasure from the work done.
Eh, I would also have headphones in the form of cartridges - in general, a fairy tale would be 🙂 
Well, now you know exactly what to do if the headphones in the jack are broken. And if your arms and legs grow from different places, then everything will work out. much better, than me!