There is something called "Pronoun-antecedent-agreement" which basically explains the number and gender of the subject must be equal to the number and gender of its antecedent.
Example:
As you can see "My sister" is a female singular noun and "her" corresponds to this.
Now, the word antecedent indicates the rule for wich the pronoun stands, and as it says ante: before.
In the example "my sister" is the antecedent and "her" the pronoun.