Combing hair sometimes produces a crackling sound because

Electric charge is produce by friction

Of dryness of hair and comb

Of friction between comb and hair

Comb attracts the hair