Answer:
They generate electricity by contact.
Step-by-step explanation:
The observation presented by the question above shows an example of electricity generated by the contact, which can also be called triboelectrification. This type of electricity is created when two objects made of different materials come into contact with each other, and that contact is interrupted soon afterwards, as occurs when someone, wearing woolen socks, walks over the carpet.
For triboelectrification to occur, it is necessary that at least one of the objects involved is electrically charged. This object, when in contact with another object, will transfer electrons carrying the neutral object, until the two objects have the same electrical potential. When interrupting the contact between the objects, the two are left with equal loads of energy.