There are positive and negative charges. Look at is this way a charge attracts a positive charge. On the other hand, when a charge is brought near a distributed charge, high is your hair for this, the positive charge attracts the negative charge so opposite charge concentration increases in the hair. So, when the same type of charge is in the hair, the hair stands up.