There are many uses of the en and em dash and also many ways to form these dashes using your computer. The following explanations offer the most common uses and methods for forming these dashes.
An en dash, roughly the width of an n, is a little longer than a hyphen. It is used for periods of time when you might otherwise use to.
The years 2001–2003
An en dash is also used in place of a hyphen when combining open compounds.
North Carolina–Virginia border
a high school–college conference
Most authorities recommend using no spaces before or after en or em dashes. To form an en dash with most PCs, type the first number or word, then hold down the ALT key while typing 0150 on the numerical pad on the right side of your keyboard. Then type the second number or word.
An em dash is the width of an m. Use an em dash sparingly in formal writing. In informal writing, em dashes may replace commas, semicolons, colons, and parentheses to indicate added emphasis, an interruption, or an abrupt change of thought.
You are the friend—the only friend—who offered to help me.
Never have I met such a lovely person—before you.
I pay the bills—she has all the fun.
A semicolon would be used here in formal writing.
I need three items at the store—dog food, vegetarian chili, and cheddar cheese.
Remember, a colon would be used here in formal writing.
My agreement with Fiona is clear—she teaches me French and I teach her German.
Again, a colon would work here in formal writing.
Please call my agent—Jessica Cohen—about hiring me.
Parentheses or commas would work just fine here instead of the dashes.
I wish you would—oh, never mind.
This shows an abrupt change in thought and warrants an em dash.
To form an em dash on most PCs, type the first word, then hold down the ALT key while typing 0151 on the numerical pad on the right side of your keyboard. Then type the second word. You may also form an em dash by typing the first word, hitting the hyphen key twice, and then typing the second word. Your program will turn the two hyphens into an em dash for you.
While there are many more possible uses of the em dash, by not providing additional rules, I am hoping to curb your temptation to employ this convenient but overused punctuation mark.