You could have sustaines a contusion
to yhe chest or even a crack fracture
of the rib which is causing the pain. It should heal on its own in due course of time. Alternately y7ou may go in for a xray of the chest to confirm yhe diagnosis and it will also help in ruling out any other pathology. So is the case with head trauma
which should also heal soon or consult your physician.