The dashes indicate an aside or parenthetical remark (one that can be eliminated without harming the sense of the basic sentence). You can set off such remarks with a pair of commas, with a pair of dashes, or with parentheses. I like peanuts, a wonderful nut, as well as almonds.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.