appositive is a noun or noun phrase renaming or modifying another noun or noun phrase that precedes it. These two nouns (the appositive and the noun or noun phrase) refer to the same thing but name it in different ways. Let’s use a student named Sara to illustrate, where “Sara” is a (proper) noun and “a student” is the appositive renaming her:
Sara, a student, raised her hand.
If we rewrite this as two sentences, both the original noun (“Sara”) and the appositive (“a student”) can independently function as the subject of the sentence:
Sara raised her hand.
A student raised her hand.
In the above example, the appositive is used to give you extra information about the noun that precedes it. The noun phrase “a student” tells you something about who Sara is. This a nonrestrictive appositive, because “Sara” alone is specific enough to tell the reader who we mean, and the appositive can be omitted without causing confusion. Nonrestrictive appositives should be bracketed by commas.
Let’s look at another nonrestrictive appositive, where Fiona has only one sister and that sister is named Abby.
“Fiona’s sister, Abby, drove her to work.”
In this case we once again bracket the appositive (“Abby”) with commas because we know that “Fiona’s sister” can only refer to one person. In “Fiona’s sister drove her to work” there is no confusion about who “Fiona’s sister” refers to. Adding “Abby” to the sentence is just a little more information.
But what if Fiona’s friend drove her to work? Fiona has many friends, and today Cat kindly offered to bring her.
“Fiona’s friend Cat drove her to work.”
An appositive that helps specify which of many things or people is being named is called a restrictive appositive because it restricts—or limits—who or what the first noun refers to. In this sentence the appositive “Cat” is necessary to avoid confusion if you want to know which one of Fiona's many friend drove her to work. When using a restrictive appositive, do not bracket it with commas.
Here's another restrictive appositive example: Dr. Jones is about to arrive at a college where she will join several other guest lecturers.
“The guest lecturer Dr. Jones will be arriving shortly.”
“Dr. Jones” is an appositive naming “the guest lecturer.” If Dr. Jones is one of several guest lecturers, naming her will remove any confusion about which one will be arriving shortly. In this case “The guest lecturer will be arriving shortly” does not have enough information to let us know which lecturer will be arriving shortly, and so we once again do not bracket this appositive ("Dr. Jones") with commas.
Appositives can be (and often are) much longer and more complex than simple nouns or noun phrases, however. Thomas Mallon illustrates this perfectly, writing about a 29-word appositive he found in an obituary in The New York Times:
To succeed in the genre, a writer has got to accentuate the appositive, that key phrase between the first two commas telling you just who the corpse was and what he did. Thomas can hold this syntactical note longer than Placido Domingo: "Benjamin Eisenstadt, the innovative Brooklyn businessman who set Americans to shaking their sugar before sweetening their coffee and then shook up the entire sweetener industry as the developer of Sweet'n Low, died at New York Hospital-Cornell Medical Center."
— Thomas Mallon, GQ, November 1997