Respuesta :
this happens because when you rub the balloon on the carpet, the contact jumbles up the atoms and they recieve the energy which makes your hair 'stand on end', this is the simplified version.
This is due to static Electricity it happens because friction between Electrical conductors makes Static Electricity which is not good for Electronics