Hi, Welcome to Healthcare Magic Forum.
They happen due to biting, harsh brushing, drinking or eating hot liquid and food. Even consumption of highly acidic foods, nutritional deficiency
, especially, deficiency of vitamin B12
, folic acid
and iron can cause this. They are oral ulcers or canker sores, treatment is usually not necessary. In most cases, they go away by themselves. Avoid hot or spicy foods. Apply Glycerine over them regularly. Brush you teeth twice daily. If this is not helping, you might want to visit a Dentist