Objects become charged when rubbed against one another. This happens because negatively charged electrons flow from one object to the other.
If you're a teacher, and need a way to demonstrate static electricity, then just check out this science video tutorial on how to use a balloon to show your students how it works.
When the rubbed balloon is placed close to Styrofoam pellets, some of the oppositely charged pellets go to the oppositely charged parts of the balloon. Even see how to demonstrate static electricity with a few straws.