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.