Dashes are especially common in informal writing.

1. A dash is used to indicate an abrupt break in thought within a sentence. By breaking off at the dash, the writer of these sentences implies there is much more to be told. The reader may fill in the rest. I called to him again and again, ‘Please, John, don’t go. Please, John, don’t go. Please, John –’ but I could not get him back. What she really meant was – you know what she meant.
2. Dashes are used to set off non-restrictive appositives worthy of greater emphasis than is achieved with commas. The problems – unemployment and inflation – perplex economists and mystify the public. (Use of dashes gives greater emphasis to the non-restrictive appositive unemployment and inflation than would be achieved through use of commas.)
3. A dash can introduce an afterthought, or something unexpected and surprising. We’ll be arriving on Monday morning – at least, I think so. And then we met Bob – with Lisa, believe it or not!
4. A dash is used to set off a summary, explanation. There are three things I can never remember – names, faces, and I’ve forgotten the other.