A subungual hematoma is a collection of blood (hematoma) underneath a toenail or fingernail. It can be extremely painful for an injury of its size, although otherwise it is not a serious medical condition. Nature
A laceration of the nail bed causes bleeding into the constricted area underneath the hard nail plate. The blood pools under the nail, giving a reddish, brownish, blueish, or grey/blackish discoloration. The blood puts pressure to the nailbed causing pain which can be throbbing in quality and disappears when the pressure on the nail bed is relieved.Subungual hematomas typically heal without incident, though infection may occur. The pressure of the blood blister may cause separation of nail plate from the nail bed (onycholysis), but the nail should not be pulled off, as this can cause scarring of the nailbed and deformed nails. Nail discolouration may last some months.The nail plate may also become thicker and more brittle as a result of the injury (onychochauxis). The deformed nail plate will gradually grow out and be replaced by new, normal-appearing nail plate in several months time. Infrequently, the nail may become painful and require surgical drainage. Causes
The condition is caused by a traumatic injury, such as slamming a finger in a door, or from sports activities, especially those involving sudden accelerations, such as soccer, basketball, and tennis,  or going downhill, such as running or hiking rugged terrain, and ill-fitting footwear. : 52, 135 Repeatedly thrusting the toes against a shoes toe box can cause a subungual hematoma called joggers toe, runners toe, or black toenail.
In this variant of human foot anatomy, the second toe extends further out than the great toe. This can make it harder to find shoes with adequate space around the toes. Treatment
Subungual hematomas can resolve on their own, without treatment being necessary. If they are acutely painful, they may be drained.Subungual hematomas are treated by either making a hole through the nail into the hematoma (trephining) within 48 hours of injury, draining the blood and releasing the pressure, or, less conservatively,  by removing the entire nail.In hospital or medical setting, trephining is generally accomplished by using an electrocautery device or an 18-gauge needle. If neither of these is available a heated (red hot) paper clip can be used to drain the blood underneath of the nail. To do this the tip of a paper clip needs to be heated till its red hot and (the red hot) paper clip gently placed on the center of the hematoma (center of the black area underneath of the nail). A hole will appear in the nail and the blood will drain, relieving the pressure. The hole has to be covered with sterile dressing and the nail should be kept dry afterwards.Removal of the nail is typically done when the nail itself is disrupted, a large laceration requiring suturing is suspected, or a fracture of the tip of the finger occurs. Although general anesthesia is generally not required, a digital nerve block is recommended if the nail is to be removed.