Em-dashes are used to denote sudden changes in sentence structure. They are also used (instead of commas) to set off an explanation or emphasis.
- Joan—despite her brother’s warning—entered the dark building.
The em-dash is often typed as a double hyphen in copy. In printed material, use an em-dash—which has no space on either side. University typographical standards are to add a little “air” on either side of the dash, but not a full space. In web copy, use the HTML character entity <code>—</code>. Since the em-dash is a more commanding stop than a comma, its overuse is more jarring to readers than the overuse of commas. Use sparingly.