All substances are made of atoms. These are often called particles. An atom is electrically neutral - has no overall electrical charge. However, each atom contains even smaller particles called electrons.
Electrons can move from one substance to another when objects are rubbed together. You may have done this with a party balloon: if you rub a balloon on your sweater, you can get the balloon to stick to the wall or to your hair. This is because of static electricity.
When you rub two different materials against each other, they become electrically charged. This only works for electrically insulated objects and not with materials like metals, which conduct. For example, if you rub an acetate plastic rod with a duster:
The opposite thing happens with a polythene rod:
In both examples, the materials gain an equal amount of charge but the charges are opposite (one material becomes negative while the other becomes positive).