This is a big one---perhaps the most important rule of commas.
The Rule: Set off "non-restrictive" phrases or clauses in commas.
"Non-restrictive" means basically that the phrase or clause is not necessary to the meaning of the sentence. (That is, the clause does not "restrict" the meaning of the sentence.)
The most common application of this rule is with "who" and "which" clauses:
Our dog Duke, who is the sweetest dog in the world, is addicted to Milk Bones. (The clause is not necessary to the sense of the sentence. That is, the meaning is the same without the clause.)
All dogs who are addicted to Milk Bones need to be vigilant about whining at the pantry door. (The clause is necessary to the sense of the sentence, because the meaning changes completely without the "who" clause.)
Here is the most basic illustration of this idea:
Charles Dickens' novel Great Expectations did not interest me.
Charles Dickens wrote many novels. You are referring to a particular one of them; therefore Great Expectations is not set off in commas, because it is necessary to the meaning of the sentence to know that we are talking about this novel and not another of Dickens' novel.
On the other hand:
Great Expectations, by Charles Dickens, did not interest me.
We end up using this rule quite often when it comes to appositives about siblings---and it always requires you to look at exactly how the sentence is phrased and how many brothers or sisters a person has or had.
John F. Kennedy's brother Robert served as his attorney general. (JFK had several brothers.)
BUT: John F. Kennedy's older brother, Joe, was killed in World War II. (JFK had only one older brother.)
This is a sacred section in Harbrace, 12d. It behooves every student to spend some time perusing these pages.
Addendum from one of the educators who gets GTOTD:
"One of the most common mistakes in young writers' work is to get half this rule right. They put the first comma in for the non-restrictive clause, but then they leave the second comma out.
Thus, we see an error such as this:
Smith, who plans to apply to Harvard and Johns Hopkins wants to study astrophysics.
Also, it's important to know the difference between "which" and "that" when introducing dependent or independent clauses. In American English (but not British), "which" is generally preceded by a comma; "that" is not."