1. The hyphen is used to create a single compound word. In the example below, “two-decade-old” is a single adjective, whereas “two decade-old” has two adjectives for “statues”. Without hyphens, “two decade old statues” would be absurd, having misplaced words with no clear meaning.
two-decade-old statues (statues that are two decades old)
two decade-old statues (two statues that are each a decade old)
2. The em dash (—) is used for various purposes, primarily break in thought mid-sentence, and is different from the hyphen. They should not be used interchangeably. Type the em dash by holding the left Alt key, while you press 0, 1, 5, 1 (on the numeric keypad) in that order.
There were just twenty-odd people in the room and all were sleeping
The audience numbered just twenty—odd for this time of the day—and all were sleeping.
3. The en dash (–) is different from the em dash and the hyphen, and is used to denote connections (“the India–US deal”), scorelines (“England beat India 4–0”) and ranges (“pages 12–15”). Type the em dash by holding the left Alt key, while you press 0, 1, 5, 0 (on the numeric keypad) in that order.
the Austria–Hungary border (the border between Austria and Hungary: a connection between two different words)
Another example: the disease-causing germ (Using “the disease causing germ” is ambiguous without a hyphen, as it might also mean “the disease that causes germ”, however meaningless that may be.)
Similarly the school-going kid, the en-dash, the half-blood prince, etc.
The en-dash (–) or the em-dash (—) are different from the hyphen, because they do not change the number of words (as the hyphen does: the hyphen reduces the number of words to one, irrespective of how many words you hyphenate together).
You use the en-dash to show a relationship between two words. For example, the writer–editor dispute (here, I’m talking of the relationship between the writer and the editor. You can’t use a hyphen.), the France–Germany football game, the Brad–Angelina wedding, the Hutch–Vodafone merger, etc.
You also use it when you write ranges: pages 4–11, questions 6–10. And, in case of scorelines: The legislation was voted down 201–12, France beat Germany 3–0.
The em-dash is used between clauses—unlike the hyphen and the en-dash, which are used between words.
You type the en-dash by pressing 0, 1, 5, 0 (on the numeric keypad) in that order while you hold the Alt key on Windows, and the em-dash by pressing 0, 1, 5, 1 similarly.
Note: The usage of en-dash and em-dash is often subject to specific house style.