defining clauses
We use defining clauses to to give essential information about someone or something. The ‘essential’ information is necessary to understand what is being referred to.
A defining clause will typically follow the noun to which it refers. There is not normally a comma between the defining clause and the rest of the sentence. If the defining clause is removed from the sentence, the sentence will not work or necessarily make sense.
People that are good at maths often find great success in scientific positions. (There are many people who have success in scientific jobs, but we are specifically describing people who are good at maths)
Children who like school are hard to find. (We are not saying that children are hard to find; we are saying that it specifically is the children who like school)
Lets buy food that is vegan. (We cannot buy any food, it must vegan)
non defining clauses
Non defining clauses add extra information that is not completely necessary to understand the context of the sentence. Whilst the information may be of interest, the sentence will still communicate key information. The non defining clause is separated from the rest of the sentence with a comma.
We like to go to London, which is near Essex. (The location in relation to Essex is additional information; we know of London without this additional information.)
My sister, who has many dogs, is thinking of buying a cat. (it is obvious she is my sister, the fact she has dogs is extra information and does not define who she is.)
The medication he takes, which is highly recommended by many doctors, helps him live a normal life. (The fact that the medication is highly recommended is extra information.)
In summary
A defining relative clause identifies what or who we are talking about. It is essential to what we are talking about.
A non defining relative clause provides additional information and the sentence still conveys the key information without it.