There is a transfer of electrons between the surface that came into contact.In this case, when balloon is rubbed onto your hair, electrons from the balloon transfer to your hair. When the surfaces are separated they try to maintain neutral charge by transferring the excess electron from the hair to the balloon.