Depends. Age? Recent illness? Fever? Trauma to mouth? Medications? All of these can play into ulcers in the mouth. If a child, viral illness can be the cause, ie, herpes, adenoviruses, etc. Trauma with toothbrush and others can do this. Vitamin deficiency can sometime be a culprit. Usually treat with warm salt water rinses, avoid toothpast with sodium laurel sulfate and observe. See pcp/dentist.
Mouth ulcers. Mouth ulcers are very common, the most common aphthous ulcers may appear during stress, secondary to acid foods, as allergy to some toothpastes. Sometimes is lack of vitamines. But seldom could be associated to rare disorders bechet's disease, lupus etc. Other possibilities are herpetic ulcers.