The first is simple: ‘that’ refers to people, animals, and nonliving objects; ‘which’ refers to nonliving objects or animals but never to people.
The second rule is also simple: ‘that’ is used with restrictive clauses, and ‘which’ is used with nonrestrictive clauses. A restrictive clause can’t be removed without changing the meaning of a sentence. IT IS ESSENTIAL. A nonrestrictive clause is NONESSENTIAL. The clause could be removed without changing the overall meaning. An example:
The large garden that is behind the house has both flowers and vegetables.
The large garden, which is behind the house, has both flowers and vegetables.
The first sentence infers there are several gardens, and this is about the garden behind the house. Take away the essential clause ‘that is behind the house,’ and the meaning of the sentence changes. The second sentence is talking about one particular garden, not one of several. Remove ‘which is behind the house’—and it doesn’t change a thing.
Notice that a ‘which’ clause is always set off by commas; a ‘that’ clause never is. And when the choice between ‘which vs. that’ isn’t clear, ‘that’ is the safest pick.
Let’s quickly look at another word pair: wake or awake. Both mean ‘to rouse or wake from sleep’. Wake is most commonly heard and is often used with ‘up.’ Examples:
Please wake me early tomorrow morning.
Please awake (or awaken) me early tomorrow morning.
The sun will wake me up when it shines through the window.
The sun will awake (or awaken) me when it shines through the window.
“Wake up and smell the coffee,” which means “See the truth, how things really are,” could also be expressed, “Awake and smell the coffee.” The tone of ‘awake’ is slightly more formal.