By creating friction it pulls electrons away from the nucleus which creates static electricity. this is because when you rub a balloon against your hair it sticks to the balloon because electrons are being removed from your hair so it becomes positively charged and the balloon becomes negatively charged because it gains electrons which are negatively charged. and different charges attract each other and the same charges repel.