An ulcer is a sore on the skin, or the mucosa that line body cavities like the mouth, nose, vagina and rectum. Ulcers occur when damages skin or mucosal tissue fails to heal.