The question needs clarifying, so I'll place it into two answers for the two possibilities.
If in question to white spots on the nail itself, this is often due to the nail being damaged whilst in the process of being formed inside the finger. So if one were to, for example, smash their thumb in a door, the results would not only be a bruised thumb but when the nail grows out you will see a white patch where the formation of the nail was interrupted by the impact of the door.
Some people often wonder if it's due to a deficiency of some sort of vitamin or the like, which is one of the least likely causes. Such a deficiency, however, may cause the nail as a whole to become more brittle or softer, whatever the case may be, and thus more susceptible to becoming damaged.
Now, if it was in question to a bruise beneath the nail, it's no different than a bruise on the skin. Whatever impact or incident brought about the bruise remained, for the most part, internal and so blood escapes the vessels beneath the skin or nail and shows through the thin layer. The color of the bruise depends of whether the escaping blood is oxidized or not, blue blood being the non-oxidized.
(This is all a wild guess from personal knowledge and experience. I didn't do any research, so feel free to correct me.)
Chat with our AI personalities
Your toenail is too long and the shock it receives from your shoe when you walk can actually tear the toenail in places from your toe. Trim your nail and it will recover.