Look at this example sentence:
The woman
who lives next door is a doctor.
who lives next door :
relative clauseA
clause is a part of a sentence. A
relative clause tells us which person or thing (or what kind of person or thing) the speaker means:
- The woman who lives next door ... ('who lives next door' tells us which woman)
- People who live in the country ... ('who live in the country' tells us what kind of people)
We use
who in a relative clause when we are talking about people (not things):

- An architect is someone who designs buildings.
- What was the name of the person who phoned?
- Anyone who wants to apply for the job must do so by Friday.
You can also use
that (instead of
who), but you can't use
which for people:
- The woman that lives next door is a doctor. (not the woman which)
Sometimes you must use who (not that) for people - see Unit 95.
When we are talking about things, we use that or which (not who) in a relative clause:

- I don't like stories that have unhappy endings. (or stories which have ... )
- Grace works for a company that makes furniture. (or a company which makes furniture)
- The machine that broke down is working again now. (or The machine which broke down)
That is more usual than which, but sometimes you must use which - see Unit 95.
Remember that in relative clauses we use
who/
that/
which, not
he/
she/
they/
it.
Compare:
- 'Who's that woman ?' 'She lives next door to me.'
I've never spoken to the woman who lives next door. (not the woman she lives) - Where is the cheese? It was in the fridge.
Where is the cheese that was in the fridge? (not the cheese it was)
What = 'the thing(s) that'. Compare
what and
that:
- What happened was my fault. (= the thing that happened)
but- Everything that happened was my fault. (not Everything what happened)
- The machine that broke down is now working again. (not The machine what broke down)