Selenium sulfide shampoo belongs to a class of medications called anti-infective. This medication works by slowing the growth of the yeast which causes the infection. This medication is applied to treat dandruff and a certain scalp infection .It reduces irritation, flaking, itching, and redness of the scalp.