Classically, it is due to an aspergilloma, a form of aspergillosis, that occurs when the fungus Aspergillus grows in a cavity in the lung.
Aspergillosis, which involves the growth of the fungus Aspergillus, can lead to an aspergilloma, a type of fungal infection that forms in a lung cavity.