The black stuff on garlic is a type of mold caused by a fungus called Aspergillus niger.
Aspergillus niger mold and fungus often appears on the outer skin of the garlic bulb and especially around the neck of the garlic and can manifest as spots or black streaks.
The mold on the garlic is often a result of a post harvest issue and means it develops after the garlic has been harvested and stored and often as a result of improper drying or storage conditions that are warm.
The black mold on the garlic means that the garlic is not safe to eat and should be thrown out.
Discard any garlic that is effected with the black mold and to help prevent the black mold from appearing on the garlic store the garlic in a cool, dry and well ventilated area.
Most mold produce mycotoxins, that can cause cancer and other diseases.
Just looking at the mold color and morphology ( under a microscope), one can not decide.
It's not worth the risk of possibly getting sick from eating the garlic with the mold on it so just throw it out to be safe and use fresh garlic without the mold.
Aspergillus niger is a type of mold that classified within the Nigri section of the Aspergillus genus.
The Aspergillus genus consists of common molds that are found throughout the environment within soil and water, on vegetation, in fecal matter, on decomposing matter, and suspended in the air.