The friction moves electrons to the comb, so the comb has more electrons than protons, and is negative. Your hair looses electrons so it has more protons than electrons. This makes it positive. Al the positive charges in the hair repel each other and the hair wants to stay as far away from each other as it can so the hair sticks out in all directions.