Example: Children who (that) play with fire are in great danger of harm.
The man who bought all the books by Hemingway has died.
Generally, who and which are more usual in written English whereas that is more usual in speech when referring to things.
Relative Pronouns Used As The Object of Defining Relative Clauses
Example: That's the boy (Ø , that, who, whom) I invited to the party.
There's the house (Ø, that, which) I'd like to buy.
Relative Pronouns Used As A Possessive In A Defining Relative Clauses
Example: He's the man whose car was stolen last week.
They were sure to visit the town whose location (OR the location of which) was little known.
NOTE: It is preferable to use that (not which) after the following words: all, any(thing), every (thing), few, little, many, much, no(thing), none, some(thing), and after superlatives. When using the pronoun to refer to the object, that can be omitted.
Example: It was everything (that) he had ever wanted.
There were only a few (that) really interested him.