I admit that most people don’t care about the difference between “that” and “which” in a sentence. But when used incorrectly, it grates on other people’s nerves. The difference is not difficult to learn.
If the sentence makes sense without the clause, then the clause should begin with a comma and “which.”
I am going to wear my new coat, which is warmer than my old one.
“I am going to wear my new coat” is a complete sentence as it is. The “which” clause is a sort of aside.
If the sentence does not make sense without the clause, then the clause should not start with a comma and should begin with “that.”
I am going to wear the coat that has the matching scarf.
You need the phrase “that has the matching scarf” to have the sentence make sense.
Note that “which” always has a comma before it, while “that” never does.
Here are some other examples of correct usage:
I spent all my money, which is going to make paying my rent impossible.
I spent the money that I needed for my rent.
I went to work on Thursday, which is usually my day off.
I went to work on the day that I usually have off.
I have to stop at the bank, which is on my way to the grocery store.
I have to stop at the bank that’s on Roberts Avenue, not the one on Park Avenue.
Everyone wants a piece of your chocolate cake, which is so delicious.
I want to have the cake that has the pink frosting.