I found the following article that goes over iPod troubleshooting. I would read the whole thing through, but there's a section that applies to your situation that I pasted below.
The headphones don't work
If your iPod's headphones don't work or have static or garbled audio, try connecting them to any other 3.5 mm stereo headphone jack, like the one on your computer. If the issue with the headphones persists, replace them. For an iPod under warranty, you can order a replacement online. Otherwise, check out the cool headphones at the Apple Online Store. If the issue appears to be with the iPod, try resetting it. If that doesn't work, then restore iPod with the latest iPod software using iTunes 7 or later.