It's going to happen. Your iPhone or iPod will like need some warranty repair from Apple. If it's under warranty, you can either send it in or take it to an Apple Store. I have a case open right now for my wife's iPhone 3GS. In her case, the sound of phone calls (when holding it up to your ear) is really low and sounds like the person is inside of a tunnel; the speakerphone and headset work fine.
I called Apple Care and they told me it sounds like it might need replaced if a full restore doesn't fix it. I tried the restore, and sure enough, it's still broken. The Apple Care rep informed me that if there was any water damage, the warranty was void. I pretty much expected this, as it's standard on almost all cell phones. Typically they put a white dot behind the battery, that when touched by water, it turns red. That's an easy way for a store technician to deny you a warranty, and it keeps us honest.
That's fine and dandy, but what if you used it in the rain, and didn't drop it in the toilet? Well, you could be a victim of a voided warranty. Yes, even if you have the extended Apple Care warranty, it will still be voided.
Luckily you can go to Apple's website and they show you exactly what they are looking for. You can check for water damage by looking inside the headphone jack and on the dock connector if you have an iPhone 3G/3Gs. All of the other iPods and iPhones they simply put the white dot inside the headphone jack.
You need to know this before you go into get your iPhone fixed, for any reason. Still, if your dot isn't pristine white, it's always worth a try to get an Apple Genius to help.
Follow this link to check Apple's official Liquid damage guidelines.