The two most common uses of hyphens are to divide words and to place between modifying words that make up an adjective. In most other cases, dashes are used. There are no spaces on either side of a hyphen.
The em dash (named for its length—roughly the space of the letter m) is used primarily in place of parentheses or a semicolon. It may separate a parenthetical phrase from the rest of the sentence or continue a thought. There are no spaces on either side of an em dash.
2-Em and 3-Em Dashes
There are also 2-em and 3-em dashes, although we seldom use them. The 2-em dash (no spaces on either side) denotes missing letters. The 3-em dash (no spaces on either side) indicates the omission of an entire word. The 3-em dash is also used in bibliographic listings to indicate the same author as in the preceding item.
The en dash (named for its length—roughly the space of the letter n) is longer than a hyphen and about half the length of the em dash. The main use of the en dash is to indicate continuing, or inclusive, numbers (dates, time, or reference numbers). It is also used in names of institutions (e.g., the University of Wisconsin–Eau Claire). There are no spaces on either side of an en dash.
According to the Office of University Marketing, hyphens should be eliminated between the area code and seven-digit number in phone numbers (e.g., 515 294-1858).