this happens because the charged rod induces a charge in the paper - if the rod is positively charged, it attracts the electrons in the paper towards to it. if it's negatively charged, it repels the electrons. this gives the surface of the paper near the rod an opposite charge to the rod, so the rod and the paper are attracted together.