Dandruff is primarily caused by an overgrowth of Malassezia yeast, which leads to skin shedding and inflammation. To prevent it, alternate anti-dandruff shampoos with selenium sulfide, zinc pyrithione, sulfur, sodium hydrochlorite, or ketoconazole regularly, and avoid hair products that irritate your scalp.