Toe nail clot
What you are describing sounds most like a "subungual [underneath the nail] hematoma [clot]".
This is a common injury, usually due to a bump or contusion of the toe which breaks a blood vessel under the nail. It is not a serious injury but it can be quite painful depending on the amount of blood. For severe pain, to release the blood a doctor touches a hot wire to the nail to release the blood.