Dear student,
Ulcer is the condition in which mucous lining of stomach, duodenum, mouth, oesophegus etc. get damaged which exposes tissues to digestive juices, acids, and enzymes which degrades it. It is caused by bacterial infection, acidity in the stomach, drugs like NSAIDs (non steroidal anti inflammatory drug), smoking etc.
Regards