It's probably one of the wires inside the headphone lead has broken.
Does the same problem happen on all devices you plug the headphones into?
Or just one thing, say your PC for instance? (could it be a laptop headphone socket?)
If the problem is with all devices, ipods, pc's etc, then it's the headphone lead broken inside. If you can solder small wires and parts, you could change the lead yourself, but if the headphones are less than a year old you should return them under guarantee.