My word processor changes the form of dashes to something longer sometimes – becomes —.
I change it back sometimes.
I’m obsessed by punctuation. I bought and read a book on the semi-colon, and love using Oxford commas.
This article on Mental Floss outlines the dash or hyphen, the en-dash, and the em-dash (both named because each dash is meant to be the width of the letters ‘n’ and ‘m’) and when they should be used.
I note the ordinary dash is used in both the written names of the en-dash and em-dash, so it can feel smug about that piece of oneupmanship.
In general, a good way to remember whether you need an em dash or an en dash is to ask yourself some version of this question: Are you trying to separate whole parts of a sentence, or link individual terms together?
If the answer is the former, go with an em dash.
An en dash, meanwhile, connects words or numbers that designate a range or score, often replacing the word to.
En dashes also come in handy when you’re linking modifiers with open compound words, like New York–style pizza. +++
Chicago-style pizza, on the other hand, needs a hyphen. So does any other instance in which you’re only linking a word to the one directly next to it.
More, including some amusing examples, at Mental Floss.