An **em-dash** is typically used as a stand-in for a comma or parenthesis to separate out phrases—or even just a word—in a sentence for various reasons (e.g. a parenthetical; an ersatz-ellipsis). Examples where an em-dash should be used:

- School is based on the three R’s—reading, writing, and ’rithmetic.
- Against all odds, Pete—the unluckiest man alive—won the lottery.
- I sense something; a presence I've not felt since—

An **en-dash** is used to connect values in a range or that are related. A good rule is to use it when you're expressing a "to" relationship. Examples where an en-dash should be used:

- in years 1939–1945
- pages 31–32 may be relevant
- New York beat Los Angeles 98–95
- When American English would use an em-dash – following [British and Canadian conventions](https://en.wikipedia.org/wiki/Dash#En_dash_versus_em_dash).

A **hyphen** is used to join words in a compound construction, or separate syllables of a word, like during a line break, or (self-evidently) a hyphenated name.

- pro-American
- cruelty-free eggs
- em-dash
- it's pronounced hos-pi-tal-it-tee
- Olivia Newton-John

Finally, a **minus sign** is distinct from all three of the above.

- 4 − 2 = 2.

If you want to use the correct dash or hyphen in Stack Exchange comments, just use the appropriate HTML entity: `—` for em-dash, `–` for en-dash, and `−` for the minus sign. The hyphen is, of course, directly on your keyboard.