Dandruff forms due to disrupted scalp flora, irritation, dryness, excess sebum, conditions like psoriasis or eczema, and overgrowth of the fungus Malassezia.