Try the headphones in another device, or another pair in your iphone.
If it'd the earphones, junk them and spend some money on better ones, the're rubbish anyway.
I have this same problem right now and I think its the ipod as the earphones work fine in my laptop. Might have to upgrade the ipod yet. I find though that if I press down on the earphone cable where it's plugged into my ipod it works but it's annoying to have to do that all the time I dropped my 'pod a few times so that might have something to do with it.