A bruise is caused by capillaries, very small blood vessels, bursting due to some kind of trauma, so blood pools in that area. If they burst under your nail, some of that blood could be trapped between the nailbed and the nail itself. Whatever blood attaches to the nail gets moved out as the nail grows.
When you get a bruise elsewhere, your lymphatic system gradually absords the blood, since at that point it’s dead, and it eventually gets filtered out in your kidneys and passed in your urine.
Latest Answers