We use relative pronouns to join two pieces of information together. It replaces the noun.
So instead of repeating the noun This is John. He lives here.
we can use a relative pronoun to link the two sentences together This is John who lives here.
We use who for people:
She is the girl who lives next door to my parents.
They are the people who have bought our house.
When the person we are talking about is the object of the sentence (when the word after the relative pronouns not a verb), we use whom (although in spoken English who or that is more common).
She is the girl whom I love.
This is the man whom I told you about.
It is also possible to omit the relative pronoun in this situation
She is the girl I love.
This is the man I told you about.
We use which for things:
The book which I’m reading is excellent.
I can’t hear the music which she is playing.
We use that for people and things (more common in spoken English)
“Make me an angel that flies fom Montgomery” (John Prine, Angel from Montgomery)
That’s the car that I want to buy.
We use whose to talk about possession for people and things
He’s the man whose dog is always barking.
I like using computers whose screen is not too small.
We use where to talk about places.
This is the house where I was born.
This is the pub where I met her.