Generally ulcer is formed if something hurt, stress, constipation, burn with hot beverage. this kind of ulcer generally heal in 7 to 10 days. you can apply gums paint over that area so it will provide symptomatic relief. if its not heal for longer period you can visit near by dentist for check up.