Treatment depends on the cause. Sometimes over-the-counter medicines or changes in diet can help. Other times prescription medicines or surgery may be needed.