There are two types of relative clauses in English: those that add extra information (non-defining relative clauses) and those that modify (or define) the subject of the sentence (defining relative clauses).
These clauses define the noun and they identify which thing or person we are referring to.
"The present which he bought me is beautiful."
"The man who has started an English course is from Spain."
Whom is used to refer to the object of the verb.
The people with whom I was sitting were very noisy.
However, it is hardly ever used in spoken English. Instead, "who" is used with the preposition:
The people who I was sitting with were very noisy.
To whom are you speaking? = Who are you speaking to?
For whom are you buying the present? + Who are you buying the present for?
In spoken English, "that" is often used instead of "which", "whom"or "who".
"The present that he bought me is beautiful."
"The man that has started an English course is from Spain."
When, where and whose
When: Is there another time when (that) I can call you?
Where: Can you tell me where I can buy wrapping paper?
Whose: (possessive) Have you seen the TV show whose catchphrase is "Deal no deal?"
Omitting that, who and which
If the pronoun ("that", "who", "which") is the object of the verb, it can be omitted.
"The company that she works for is based in London." ("That"is an object pronoun.)
= "The company she works for is based in London." ("That"can be omitted.)
"The company that employs her is based in London." ("That" is a subject pronoun.)
The company employs her (the company is the subject). In this case, it is not possible to omit "that". You need the pronoun because it is the subject of the verb.
Non-defining relative clauses
These clauses add further information.
"My students, who are all adults, are learning English to get a better job."
"The textbooks, which the students like, have lots of helpful examples."
Commas are used to separate the relative clause from the rest of the sentence.
"That" cannot be used instead of "who"or "which" in non-defining relative clauses.
You can use "some", "none", "all" and "many" with "of which" and "of whom" to add extra information:
My students, many of whom are from Europe, are learning English to get a better job.
The textbooks, some of which the students like, have helpful examples.
Comparing defining and non-defining relative clauses
The meaning of the sentences changes if you use a non-defining clause rather than a defining clause. Compare the following:
The students, who had revised hard, passed the exam. (All the students revised and they all passed the exam.
The students who had revised hard passed the exam. (Only some of the students revised, and these were the ones who passed the exam.)