AN IDENTIFYING RELATIVE CLAUSE — THAT / WHICH
An identifying (restrictive) relative clause adds information or narrows the noun to a specific one, group or lot. The clause helps by telling us which one, where or when. The pronoun which is used when it is preceded by a preposition. NO COMMAS are used to set off the clause. The pronoun that is more commonly used.
The water that I drank last night contained sodium. (identifies the specific one)
The car that runs off of a lithium-ion battery is surprisingly fast.
The problem about which I wrote is the subject of today's lecture.
The prison that is located in San Francisco Bay was a depressing place to work.
A NONIDENTIFYING RELATIVE CLAUSE — WHICH
A non-identifying (non-restrictive) relative clause adds extra information about a noun already identified by other means, for example, by name, by shared knowledge or context. The clause is just adding extra or interesting information. That is not used in a nonidentifying clause. COMMAS are used before and after the clause.
The Evian water, which I drank last night, contained sodium. (adds extra info)
The Tesla, which runs off of a lithium-ion battery, is surprisingly fast.
The Lost Generation , about which I wrote, is the subject of today's lecture.
Alcatraz Prison, which is located in San Francisco Bay, was a depressing place to work.
source: http://www.grammar-quizzes.com/clauses-5.html