Relative pronouns have a double use: inside their clauses, they act as subjects or objects; at the same time they connect relative clauses to nouns or pronouns in other clauses.
As objects or subjects relative pronouns can replace words like he and him. Note that just one subject or object is enough in a relative clause.
Compare:
I have a friend. She writes plays for television. (Two separate sentences)
- I have a friend who writes plays for television. (Two clauses connected by a relative pronoun)
(NOT I have a friend who she writes plays for television.)
Here the relative clause ‘who writes plays for television’ modifies the noun friend.
This is Jane. She does my hair.
- This is Jane who does my hair. (NOT This is Jane who she does my hair.)
Here the relative clause ‘who does my hair’ modifies the noun Jane.
She married my cousin. I really like him.
- She married my cousin whom I really like. (NOT She married my cousin whom I really like him.)
Here is a book. It might interest you.
- Here is a book which might interest you. (NOT Here is a book which it might interest you.)
Here the relative clause ‘which might interest you’ modifies the noun book.
Notes
The relative pronoun that can refer to both people and things. Who is only used to refer to people. Which is used to refer to objects.