This is known as corn smut. It’s actually a delicacy!
https://en.wikipedia.org/wiki/Corn_smut
Corn smut is a plant disease caused by the pathogenic fungus Mycosarcoma maydis, synonymUstilago maydis. One of several cereal crop pathogens called smut, the fungus forms galls on all above-ground parts of corn species such as maize and teosinte. The infected corn is edible; in Mexico, it is considered a delicacy, called huitlacoche,[5] often eaten as a filling in quesadillas and other tortilla-based dishes, as well as in soups.[6]