End of the time journey
Although normally charges align in a way that they are distributed in balance (neutrally), they can be redistributed. Thereby several substances have a certain receptivity of charge. In case of many substances it is very difficult to change the neutral charge distribution. Whereas plastic easily receives negative charges so that it can easily be charged negatively. Glass, amber or your hair emit negative charges very quickly, so that those can be easily charged positively.
So exactly spoken, in case of rubbing charge is not produced. Instead already existing charges of the bodies are redistributed.
If an air balloon is rubbed against the hair, negative charges are released from the hair and gather in the air balloon. Consequently the balloon is charged negatively and hair positively.
Benjamin Franklin charged the glass positively and the cloth negatively in the first step during his experiment, because the cloth received electrons from the glass. Afterwards, when he rubbed the cloth against the amber, it emitted even more electrons to it. So the cloth is also charged positively, so that it was repelled by the glass.
Today we know that charges of a body are inside its atoms. As a rule the transformed charges are the so called electrons.