White, grey or green mould in a compost pile is normal and usually a sign it is working. Fungi are part of the decomposition crew, not an infection. The exception worth care is breathing in large quantities of spores. Below: what causes mold in compost, how to fix it today, and how to stop it happening again.
Mold in compost.
What the colours mean
White, thread-like, smells earthy: fungal mycelium, often actinomycetes. Ideal. It is what breaks down woody material.
Green or blue-green fuzz: common moulds on bread, fruit or citrus. Harmless; turn them in.
Bright orange or yellow slime: usually slime mould. Startling and completely harmless.
Grey, slimy, sour-smelling mats: not really mould. That is anaerobic decay. See compost smells bad.
The one genuine caution
Turning a dry, dusty, heavily fungal pile releases a lot of spores. People with asthma, allergies or compromised immunity should wear a dust mask and dampen the pile first. Aspergillus fumigatus is present in most compost and is a real, if uncommon, respiratory risk for susceptible people.
Rule of thumb: if it smells earthy and mushroomy, it is fine. If it smells sour or of ammonia, the problem is air, not fungi.