Ketoconazole and salicylic acid shampoo is used to treat dandruff and related scalp conditions like seborrheic dermatitis. It works by combining the antifungal action of ketoconazole to combat the fungi that cause dandruff and the keratolytic effect of salicylic acid to loosen and remove dead skin cells on the scalp. This helps reduce itching, flaking, and redness associated with these conditions.