Welcome to the forums. If you need additional help or have more questions or details to share, please join the site so you can reply in this thread. See this link for instructions on how to join Android Central.
It's difficult to troubleshoot a phone without actually having it, but it sounds to me as if you have a defective earphone jack. You'd have to bring it into a repair shop and have it replaced. (It's a cheap part, but the labor to replace it isn't cheap.)