Hi,
Seem like you have a local trauma and inflammation of the rib and that called costocondritis. At home you can take rest and start on some pain killers and it would decrease in due time, avoid doing anything heavy and it's not serious, so relax and have a great health.