When the comp brushes through your hair it takes away the positive electrons from you hair strands, the positive electrons from the comb attracts the negative electrons on your hair and therefore the hair strands produce static and follow the comb. i think its that!
In your hair you have positive and negative particles, the same with the brush. when you brush through your hair the negative particles are removed. therefore in this situation the brush is positive and so is your hair which means they are repelling eachother creating static energy. thats what i think anyway!