An ulcer is a sore or open wound that occurs on the skin, usually as a result of some kind of injury or irritation. It can also refer to a lesion in the lining of an organ such as the stomach or intestines, which may be caused by inflammation or infection and can cause pain and discomfort if left untreated.