When should I use an em-dash, an en-dash, and a hyphen?
Is there any difference between:
-- or in some cases, a long dash
I have seen these two used lots of places but I really don't know the difference.
This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.
There are three types of "dashes" in English: a hyphen ("-"), an en-dash ("–"), and an em-dash ("—"); to that you could also add a negative-sign or minus-sign from math.
The problem and confusion comes from not only knowing the difference, but trying to use them on a normal keyboard (assuming the font in use has the desired glyphs).
In typing class you may have learned to type
The en-dash is used between ranges, often numbers "February 2–6", but can also be "Monday–Friday". In TeX, you type
As Tom said, Microsoft Word has made a mess of this with its auto-correct settings.
The good people at Microsoft Word may have confused authors by setting up auto-correct to replace two sequential dashes with a single em (longer) dash. The intent is to be helpful because the em dash can be quite useful, but does not appear on standard keyboards; but the effect is to confuse many people who fail to spot the non-obvious difference between the short and long dashes.
Stylistically, I believe the convention for using an em dash is to let the writer signal that the thought after the dash is a kind of temporary interruption to the flow of the sentence and its paragraph.