An em dash is about the length of the letter M (—) , and an en dash is about the length of the letter N (–). That is all you need to know. Just kidding, but this tidbit certainly helps me keep them straight!
Em Dash (—)
An em dash—one of my favourite forms of punctuation—can replace a comma, a colon, or surround parenthetical information.
Shortcuts:
On a Mac: Option + the minus sign
On a PC: Control + the minus sign
En Dash (–)
An en dash represents the idea of “between ___ and ___.”
Example: The meeting will take place 9:00am – 11:00am.
Shortcuts:
On a Mac: Option + the minus sign
On a PC: Control + the minus sign
Hyphen (-)
A hyphen is used in compound words (and, like the en dash, the hyphen can also represent a range, for example pages 4-9).
Example: book-length manuscript
But, use an en dash when a prefix applies to more than one word that follows it:
Example: post–World War Two
For a succinct and helpful guide on how to use these punctuation marks in your writing, see https://www.merriam-webster.com/grammar/em-dash-en-dash-how-to-use