If two materials with a difference in their electron retaining powers (like glass/plastic/rubber and wool) are rubbed together, the friction does "work" and transfers electrons from one to the other and creates a difference in electric potential energy (p.d. or simply voltage). When the two come into contact again (possibly through a resistor), electrons are transferred back to the material from which they originally came. This "going back" is an electric current and can usually be seen in the form of a spark if they are brought into direct contact.
Otherwise, friction can produce heat which can theoretically be used to generate electricity using a thermopile, but you need a very cold heat sink for that and practically you will end up getting 0.01 volts of p.d. from a million thermocouples and like negligible power due to what we call the "second law of thermodynamics", and you will use up more electricity to cool the cold end than a million such generators will produce.