Use a dash when you need to indicate a sudden change in thought in a sentence. For example: The answer to the question is---I forget it now.
A dash is used when you need to emphasize or clarify extra information in a sentence. For example: My dress---my favorite dress---got torn on my way to work.
To show a relationship between two ideas, use a dash instead of a subordinating conjunction such as after, because, unless. For example: I decided to wear the blue dress after I spilled coffee on the red one. I decided to wear the blue dress---I spilled coffee on the red one.
Instead of a conjunctive adverb such as however or furthermore, a dash is used in informal writing to show how two ideas are related. For example: I wanted to be on time for school; however I was late. I wanted to be on time for school---I didn't make it on time.
Use dashes sparingly and only use them in informal writing. Dashes normally are not encouraged in professional or academic writing.