This punctuation mark is, in Spanish, the equivalent to parentheses, though it does have one function that differs: marking off asides that are suggestive, ironic, or emotional, and the effect is stylistic. It must always be placed at the end of the aside, even when it is the end of the sentence.
In English, a single or double dash can also be used to mark off asides, but it also appears in cases of explanation, summary, or emphasis, whereas Spanish uses a colon, comma, semicolon, or ellipsis in those cases. It is used to indicate an interruption in the speech, in the same way that an ellipsis is used.
In English, when the aside that is marked off between dashes is within another aside that is marked off by commas, the second comma is omitted. Though in English there is a variation in the length of the dash and the use of spaces with it, its length and spacing (one before and after always) is universal in Spanish.