The dash (—), also called the em dash, is the long horizontal bar, much longer than a hyphen. Few keyboards have a dash, but a word processor can usually produce one in one way or another. If your keyboard can't produce a dash, you will have to resort to a hyphen as a stand-in. In British usage, we use only a single hyphen to represent a dash - like this. American usage, in contrast, uses two consecutive hyphens -- like this (A). Here I must confess that I strongly prefer the American style, since the double hyphen is far more more prominent than a single one and avoids any possibility of ambiguity. If you are writing for publication, you will probably have to use the single hyphen; in other contexts, you should consider using the more vivid double hyphen. In any case, you will be very unlucky if your word processor can't produce a proper dash and save you from worrying about this.
There are two slightly different conventions for using a dash. The more modern one is to put white spaces at both ends of a dash, while the older style uses no white spaces at all, but writes the dash solid next to whatever precedes and follows it. Both conventions are in use, and hence you may see either of the following:
The dash has only one use: a pair of dashes separates a strong interruption from the rest of the sentence. (A strong interruption is one which violently disrupts the flow of the sentence.) Again, note that word `pair': in principle, at least, dashes come in pairs, though sometimes one of them is not written. (Remember that the same thing is true of bracketing commas, which set off weak interruptions.) Here are some examples:
Finally, in the rare case in which a sentence is broken off abruptly without being completed, a single dash is also used:
When a dash falls between the end of one line and the beginning of the next, you should try to ensure that the dash is placed at the end of the first line and not at the beginning of the second, if you can. Most word processors will not do this automatically, however, and it will require some fiddling.
That's all there is to know about the dash. Use the dash carefully: overuse of dashes will give your writing a breathless and disjointed appearance. And don't use a dash for any purpose other than setting off a strong interruption: the dash is never used in place of a hyphen, after a colon or after a direct quotation, except sometimes in novels, but this is not a usage you should imitate.
There is one last point, very trivial. In a certain style of writing which is now felt to be antique and genteel, a dash is occasionally used to represent the omission of several letters from a word or a name. The exceedingly genteel Victorian novelists often wrote d—n in place of damn, and even Go to the d—l! instead of Go to the devil! Such usages strike us as comical now, and few writers today would hesitate to write out such mild oaths in full (but compare the related use of asterisks for the coarser words). Some Victorians, not wanting to set their fictional narratives in any identifiable location, also wrote things like At the time, I was living at B— in the county of S—. This quaint affectation is now dead.