Hernias are bulging areas where a defect in the muscle of the abdominal wall allows abdominal contents like the intestines to bulge out. They typically occur in the groin or in the midline of the abdomen near the belly button. It is not impossible to have a hernia over on the side of the abdomen, but it is very uncommon, and I think other causes of your pain and swelling are more likely.
For example, if you were recently exercising vigorously, you could have pulled or strained a muscle between the ribs. This could result in pain and some swelling.
Similarly, if you have had a recent fall or a blow to the side, a contusion (bruise) over the ribs is a common injury. Occasionally, you might even suffer a rib fracture
, which can cause significant swelling.
I suggest that you start by seeing your primary care doctor
about this problem. They can help you decide whether or not this is something that requires further evaluation, which might include an x-ray
of the ribs and chest looking for a fracture. At a minimum, your doctor will be able to prescribe you medications to help reduce the swelling and pain.