That is commonly used as a relative pronoun in identifying relative clauses. As a relative pronoun that can refer to things. In an informal style, it can also refer to people.
- Where is the girl that sells the flowers? (OR Where is the girl who sells the flowers?)
- The necklace that she gave me was very expensive. (OR The necklace which she gave me was very expensive.)
- This is the house that Jack built. (OR This is the house which Jack built.)
- The cat killed the rat that ate the corn. (OR The cat killed the rat which ate the corn.)
In non-identifying clauses that is unusual. Instead we use who or which.
- This is Mary, who sells the flowers. (NOT This is Mary that sells the flowers.) (Here the relative clause is non-identifying and therefore it cannot be introduced by that.)
That is common after quantifiers like all, everything, anything, something, nothing, none, little, few, much, only and after superlatives.
- Have you got anything that might impress him?
- The only thing that matters is to stay happy.
- It is the best film that has ever been made about faith.
Note that what cannot be used in these cases.
- All that he says is not true. (NOT All what he says is not true.)