Hm, I would suspect one of several things, a bot fly larvea, an abcess after injury/insect bite got infected, or a tumor.
Some more info could help to narrow it down.
Is there a hole/scab in the middle of it?
How does it feel, like, free floating under the skin, attached to the ribs, soft or...