An ulcer is a kind of open wound. Ulcers can be on surfaces of the body. They can be on skin. They can be mucous membranes like the surface of the stomach or inside the mouth.
Ulcers start when the top layer (surface) of skin or mucous membrane is damaged. The top layer dies. When it dies, the skin or mucous membrane opens. This leaves an open sore called an ulcer.