A subungual hematoma is a collection of blood (hematoma) underneath a toenail or fingernail (black toenail). It can be extremely painful for an injury of its size, although otherwise it is not a serious medical condition.
With a subungual hematoma, the pain typically goes away in a few days. The nail itself will take longer to recover.
The discolored nail will eventually grow out — or in some cases it may fall off or need to be removed — and be replaced by a new, healthy one. This could take anywhere from about eight weeks for a fingernail to six months for a toenail.