The first image is for a hanging ball. The second is for an electroscope with a ball attached to two leaves, which are repelling. They are both confusing because they show + and - charges mixed together - which is reality, but still confusing. I have simplified it to make it clearer:
On the left, the negative rod has
pulled some positive charges on the ball closer and pushed some negative ones away to the other side. induced charge separation, pushing some negative charges (electrons) away and leaving some atoms with a net positive charge nearby.
On the right, the negative rod has
pulled positive charges up into the ball, and negative ones down pushed some negative charges (electrons) down onto the leaves (which then repel each other). Of course there are many charges of both kinds all over the place and not shown for clarity.
---
[edit: Text modified by moderator (blue text) to reflect the fact that in most common materials, especially solids, atomic nuclei are the source of the positive charges and are fixed in place for all practical purposes and only the electrons have the luxury of mobility. The electrons can leave behind atoms with a net positive charge. The story is different for other forms of matter where the atoms themselves are mobile, such as liquids, gases, and plasmas]