Most of the time a rib will be fractured or broken because of an impact on the site. This impact can be enough to burst the blood vessels that are located in the area. The blood vessels bursting are what will cause you to see an initial bruise in the area where the injury took place. The bruising will often spread and be tender to the touch. In addition, the bruising that is associated with a broken rib is often darker than normal types of bruises that you get from bumps and scrapes.
If you have had an impact in the area of your ribs and you notice bruising, swelling, and any pain, even if the injury did not feel as bad at first, it is important to go to the doctor right away. An x-ray will help determine how bad the injury is and how it needs to be treated in order to make sure that you do not injure yourself even more.