I suspect a shorted earpiece. The only way to confirm this, is to reset your phone to factory settings and/or remove the battery from your phone and the re-insert it. If you still have trouble with with the earpiece then it's definately shorted out. This is a hardware issue and it will physically have to be replaced. It is technically possible to get the part replaced, but if your phone is greater than 12 months old, then the repair will most likely cost more than what the phone is worth. If it's less than 12 months old, then there's a good chance the phone will be under warranty.
Let me know if there's anything I may help with, otherwise please click 'accept'.