There are many causes for the familiar (yet absurdly frustrating) phenomenon. Generally, however, it is simply due to that loose wire which enable it to regularly be fixed by pushing the wire towards the radio earpiece and, if needs be, affixing it into place with a small electrical tape, super glue, or other glue.
Sometimes, if ever the headphones have an inline volume turn, that may be the source. That one is a bit difficult to mend, but you could possibly always try the ‘wire trick’ pointed out above and see if it works. If not, then open the volume controls and re-solder the cables into place (be warned, this may invalidate most warranties, so if ever the ‘phones continue to be covered, just send ‘em back and find replacements).