Mouth ulcers are usually due to vitamin deficiency or bad digestion. Other causes are tonsils, trauma from teeth, dry mouth, tonsillitis, stress, change in lifestyle, allergies to certain foods and medication, smoking and tobacco chewing, consumption of spicy n hot foods.
Start some vitamin supplements. Apply local anaesthetic ointment like dologel. Eat healthy and balanced diet. Increase your water intake. Avoid oilly n spicy food completely.