"Relative pronouns introduce relative clauses. The most common relative pronouns are who, whom, whose, which, that. The relative pronoun we use depends on what we are referring to and the type of relative clause" (Cambridge University Press, n.d., para. 1).
Relative pronouns are that, who, whom, whose, which, where, when, and why.
Cambridge University Press. (n.d.). Relative pronouns. Cambridge dictionary. Retrieved February 24, 2021, from https://dictionary.cambridge.org/grammar/british-grammar/relative-pronouns
Use who and whom to refer to people. Use "who" when you refer to the subject of a clause and "whom" when you refer to the object of a clause (for information regarding subjects versus objects, please refer to Sentence Elements).
According to the Publication Manual of the American Psychological Association (APA, 2020), "restrictive clauses—also called "that" clauses—are essential to the meaning of the sentence. Restrictive clauses are not set off with commas" (p. 122). For example: I chose the book that I like the best. ("that I like the best" is essential to the meaning of the sentence because it specifies which book was chosen). Restrictive clauses can also be referred to as independent clauses.
In contrast, "nonrestrictive clauses—also called "which" clauses—add further information to the sentence but are not essential to its meaning. Nonrestrictive clauses are set off with commas" (APA, 2020, p. 122). For example: My book, which is red, is my new favourite. ("which is red" adds further information to the sentence and is therefore a nonrestrictive clause). Nonrestrictive clauses can also be referred to as dependent clauses.
For more information, see the Grammar Girl's Which or That?.
For more information regarding relative pronouns, please refer to The OWL at Purdue: Relative Pronouns: Introduction and General Usage in Defining Clauses and The OWL at Purdue: Relative Pronouns in Non-Defining Clauses.
American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). https://doi.org/10.1037/0000165-000