In an identifying (=essential) clause with no commas, you can use either “which” or “that”:
I like movies that have happy endings.
I like movies which have happy endings.
Cars that run on electricity are becoming more common.
Cars which run on electricity are becoming more common.
There are two situations where you must use which, not that:
1) In a non-identifying, or non-essential cause (an adjective clause that has commas):
This class, which only meets once a week, is a hybrid class.
My car, which is more than ten years old, has a lot of body damage.
2) You only use “which” after a preposition:
The university from which I got my degree is in Massachusetts.
The class in which I am learning grammar meets on Tuesday.
LISTEN TO THE TEACHER TALK ABOUT IT: