All materials contain charge because they contain positive protons and negative electrons, normally these charges cancel each other out, making most materials neutral.
If materials are rubbed together, like a bag and a hat, the friction between the two objects causes electrons to be rubbed off one of them and onto the other one.
In conducting materials like metal, where the electrons are able to move, the electrons just flow straight back again, so no charge ever builds up in insulating materials.
In insulating materials like a polythene rod and a cloth, the electrons can't flow back, so the transfer caused by the friction leaves a positive static charge on the material that lost the electrons, and a negative static charge on the one that gained them.
If a similar cloth is used to rub an acetate rod, the electrons would get rubbed off the acetate rod leaving it positive and onto the cloth making it negative.
You've probably experienced this yourself when you've touched a car and got an electric shock, this is just a small spark from the car discharging to the earth through your body.