In some ways, dashes work like parentheses. When used in pairs, dashes separate a comment within a sentence:
When it came to friends—the kind you could call in the middle of the night to take care of your kid—Fred had only one and she lived five hours away.
So why use dashes instead of parentheses? It's a matter of emphasis. Parentheses suggest the off set material is extra and non-essential to the main sentence. Dashes make the comments seem like an expansion of information and more important to the main sentence.
In other instances, the dash is closer to a colon in that it lets the reader know something else is going to be added to the main statement:
The head chef evaluated Reginald's strawberry tarts last—the filling was bitter, the crust uninspired.
Both the colon and the dash interrupt the flow of the sentence. The dash, however, creates some suspense. Use a colon when you want to be less emphatic.
Be careful about overusing the dash. Too many can dilute their impact.