There are many causes for the everyday (yet absurdly annoying) occurrence. Usually, however, it's basically due to a loose wire and can often be fixed by pushing the wire towards the earpiece and, if needs be, affixing it into place with a bit of electrical tape, super glue, or some other adhesive.
Now and again, if ever the earpieces have an inline volume wheel, that may be the reason. That one is a little difficult to repair, but you could always try the 'wire trick' pointed out above and see if it works. If not, then open the volume wheel and re-solder the wires into place (be warned, this will invalidate most warranties, so if ever the 'phones are still covered, just send 'em back and get replacements).
Avoiding stuff like this occouring in the future, it's highly recommended to wrap your cables carefully and avoiding stressing your headphones. No, I don't mean that you should give Motorhead a rest and simply play floaty, soothing New-Agey music on them, I mean you should not have them inside your back pocket whenever you sit down and you need to remove them warily from your ears after use (this will likely sound evident, and you'd be astounded how many of us just rip 'em out).
Another thing to take care for is the jack, if the cable is fraying/wearing around the jack, then that can also be a problem. Luckily, like a lot of things in life, a bit of electrical strip can really come in useful, just ensure that all the copper wiring is tightly bound and it should return to normal usage in no time.
From time to time, however, it's simply a sign that the earpieces are knackered and no quantity of brainy tinkering can fix them. Typically, in these instances, the challenge is internal. This unique variant on the problem also attacks earpieces of any price range, be they Poundland specials or your year old Sennheiser Eargasm headset. I'm reminded of a Shakespeare quote from Hamlet, something about a king plus the guts of a beggar, but I can not be bothered to look the entire thing up right now. You get the purpose I'm attempting to make though, everything dies eventually, no matter what it cost you.
you can obtain the original article here