The word 'her' — serving as both the objective pronoun ('I saw her') and the possessive determiner ('her book') — descends from Old English 'hire,' the dative and genitive form of the feminine pronoun 'heo' (she). It comes from Proto-Germanic *hezoi, the oblique feminine form of the demonstrative *hiz/*hi- (this one), ultimately from PIE *ḱe-/*ḱi- (this, here).
The most linguistically interesting fact about 'her' is its relationship — or rather, lack of relationship — to 'she.' While 'her' continues directly and unbroken from Old English 'hire,' the nominative form 'she' is NOT a continuation of Old English 'heo.' As discussed in the entry for 'she,' the nominative was replaced in the twelfth century by a form derived from the demonstrative 'seo.' This means that 'she' and 'her' are etymologically unrelated words
In Old English, the feminine pronoun paradigm was internally consistent: nominative 'heo,' accusative 'hie,' dative 'hire,' genitive 'hire.' All forms began with 'h-' and derived from the same Proto-Germanic demonstrative. The replacement of the nominative by 'she' (with initial /ʃ/) broke this phonological consistency, creating the modern mismatch: she/her/hers, where the nominative does not resemble the oblique forms at all.
The dual function of 'her' as both objective ('I told her') and possessive ('her book') is a consequence of the collapse of the Old English case system. In Old English, the dative 'hire' (to her) and the genitive 'hire' (of her, her) happened to be identical in form. As the case system collapsed in Middle English, both functions were preserved in the single form 'her.' Other languages maintain the distinction: German uses 'ihr' (to her, dative) and 'ihr' (her, possessive) — the same merger as English, interestingly — but French distinguishes 'lui' (to her, indirect object) from 'sa/son' (her, possessive).
The German cognate 'ihr' has an even more remarkable range: it means 'her' (dative), 'her' (possessive), 'their' (possessive), and 'you' (formal plural). This multiplicity shows how a single pronoun form can accumulate diverse functions over time when phonological merger collapses originally distinct forms together.
The possessive form 'hers' (as in 'the book is hers') developed in Middle English by analogy with the noun possessive '-s' (as in 'the king's'). Old English did not have 'hers' — the genitive 'hire' served predicative and attributive functions alike. The addition of '-s' to possessive pronouns (hers, ours, yours, theirs) created a new class of absolute possessive pronouns that could stand alone without a following noun.