Writing dashes and hyphens is something I've seen often done incorrectly in fiction and essay writing of my peers. In fact, I didn't know how to handle dashes correctly until I somehow ended up on a Wikipedia page about en verses em dashes (and I thought I was pretty weird for knowing that kind of thing). All right, let's start.
There are three dash markings. One is the hyphen, and it is the shortest. The hyphen creates compound words. The tilt-shift lens is too expensive for a low-budget shoot. Both dashes you saw there were hyphens, which, on any computer platform, is the minus sign located beside the plus sign (or wherever your keyboard layout places it).
The en dash is longer, and, before you ask, is named due to its length being the same as an uppercase N. At least, that's what it should be. The en dash is the rarest of the three, but you'll see it in sports scores: The Red Sox beat the Yankees 3–2. Note the difference: 3-2, 3–2. Not a big one, but it's a slight technicality. If you mess this up, nobody will kill you, though the New Yorker might fine you. On the Mac, you can achieve this dash with option+- (minus key). On Windows hold Alt while typing 0150.
The em dash is the longest—the length of the letter M—and most commonly typed incorrectly. As you can tell, I just used the em dash. A lot of people write it as such: Instead of chocolate - albeit weak chocolate - he would receive . . . . This I find wrong as the dash neither touches both words nor is long. On the Mac, you can achieve this dash with option+shift+- (minus key). On Windows hold Alt while typing 0151. Or, if you're using word, type it out using two hyphens: em--dash. Word should auto fix that.
If you disagree with what I've said and decide you will use the hyphen for everything, be my guest. I can't say you're wrong. If an editor does, listen to them, but otherwise consistency is key. Whatever you choose to do, do it always—don't write one essay one way and the next another.