Make sure you are fully inserting the headphones jack. If you have not done so already since this problem occurred, do a Reset on the iPod
That will restart the iPod. If that does not help, in case it is a software or settings glitch that is causing this problem, you can do a Restore of the iPod in iTunes. Select the iPod in the iTunes sidebar, under DEVICES. Over to the right, go to the Summary tab. The Restore button is there. This will erase the iPod, re-install its software, and set it to default settings.
If that does not help either, the cause is probably a hardware problem. If there is an Apple Store nearby, you should make a reservation at the Genius Bar. Otherwise, use the Contact Us link at the botton right corner of this web page to contact Apple tech support, where it says, "Mac, iPhone, iPod and iPad customers within 90 days of ownership are eligible for complimentary phone support..."