It’s easy to get confused between the hyphen (-) and the dash (–). This is a quick and simple guide to using them both:
The Hyphen
Basically, the hyphen is the shorter mark that is often used to link two or more words together. It can sometimes be seen at the end of a line to break up a whole word that won’t fit into the space. For example:
user-friendly | part-time | jump-start | well-known | up-to-date | back-to-back | next-to-last
Note that a hyphen never has spaces on either side.
There is a lot of debate and confusion regarding which words can be hyphenated, and also some more advanced rules that can by found on the hyphen page.
The Dash
The Dash is the longer line used as punctuation in sentences – coming in between words (as in this sentence). It can also be used – as here – in pairs. For example:
Paul sang his song terribly – and he thought he was brilliant!
He’s won the election—granted, there was only a low turnout—but he’s won!
There are actually two types of Dash, the en-dash and the em-dash. The en-dash is the shorter version of the dash, named en-dash as it should be the same length as the letter ‘n’. The en-dash should always have spacing before and after. The first example above uses the en-dash.
The em-dash is the longer version, named em-dash as it should be the same length as the letter ‘m’. The em-dash should never have spaces before or after it. The second example above uses the em-dash.
The first version, the en-dash, is the most commonly used form. This website has more information on the using the dash, the en-dash and the em-dash.

Thanks for the tips. It’s great to have them consolidated in such an easy-to-read format.
I’ve been using the em-dash for years but never realised where its name came from, until now.
Useful. Nice to see a concise guide written in an easy to understand way.
The guideline that em dashes must have spaces on either side is very British. In American writing, those spaces are optional, especially for parenthetical asides.