The most common type of mouth ulcers are called 'apthous' ulcers. They are probably viral. (though no virus has been identified.)This means they should not be given antibiotics as there have no effect. There behaviour is similar to cold sores, in that they are recurrent, come out when we are run down and we never seem to develop immunity. Here the similarity ends, because unlike herpetic cold sores there is no treatment.
Each ulcer lasts about 10 days, but you can get further crops erupting, so each episode may last longer than that.
Ice,ice cream and cold soft items, become the easiest things to eat. Teething gels sometimes help. There are 2 prescription drugs for apthous ulcers, Corlan Pellets and Adcortyl in Orobase paste. Both are steroids, only reduce the nipping a bit and neither hastens resolution.
GP for more years than I care to remember