There may be many different reasons for a bump or swelling in the mouth.
Some are painful and others are not. Some are due to infection, whiel others may be benigin growths of bone called tori. One could also have a benign or malignant tumor forming. My best advice is to see your dentist for an accurate diagnosis. Your dentist may refer you to an oral surgeon.