How do bodies get charged?

A body gets charged by the friction of one body rubbing against another. When an object made of a substance like glass, plastic, ebonite, amber nylon, hard rubber etc., is rubber with wool, fur or silk, it electrically charge. The electrons of two materials get enough energy and move to the other material. As a result, the one losing electrons becomes positively charged, and the on obtaining electrons become negatively charged. When two objects rub against each other they either get positively or negatively charged.
The object that loses electrons gets positively charged and the object that gains electrons becomes negatively charged.

-Ruchi. Kadam