The answer is electrostatic induction. When a charged object is brought in close proximity to an uncharged object, Colomb forces from the charged objects causes a rearrangement of electrons and protons in the uncharged object. This gives the uncharged object polarity which is reversible when the charged object is removed.