Comma Setting Off Non-restrictive Clauses
A non-restrictive clause is a clause which may offer more information, but doesn’t limit the subject; this might be something of interest, such as how old something is or a job a person has. A non-restrictive clause may use the word which and can be removed from the sentence without loss of understanding.
Non-restrictive clauses are generally separated from the rest of the sentence by commas (while restrictive clauses are not).
That box of apples, which I picked this morning, can be used to make the pie.
The non-restrictive clause which I picked this morning needs to have a comma on either side of it because this information is not required to identify the box; that is the word which identifies the box (we can assume the speaker is pointing to it).
Three years ago, the house on the corner, which was of historical interest, was torn down.
As the house is already identified as the one on the corner, the fact that it was of historical interest is not necessary.