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.
In severe cases the nail may detach itself from the nail base. Unless there is damage to the matrix, a new nail will grow normally to replace it.