Use "which" when adding extra details about something already identified. For example: "My laptop, which I bought last year, works perfectly." The clause "which I bought last year" provides additional information but isn't necessary to identify the laptop.
Nonrestrictive clauses with "which" are always surrounded by commas. These commas signal that the information is supplementary rather than essential to the sentence's core meaning.
Key Differences in Practice
Compare these examples to see the distinction clearly. Restrictive: "Students that study regularly perform better." This identifies which students perform better. Nonrestrictive: "My students, which number about twenty, are very motivated." This adds extra information about already-identified students.
The comma placement serves as a visual cue for readers, similar to how appositives use punctuation to set off additional information.