The negatively charged rod cause charge migration within the penny. So, the protons and electrons in the penny move to seperate sides of the penny with the protons on the side closest to the iron ball. Then the penny could have been touched by a person or another object to ground the penny, removing the excess electrons in the penny. This is called charging by induction. So after grounding, the penny becomes positively charged. Opposite charges attract