Writers often think that dashes and hyphens can be used interchangeably. Actually, each mark has its own distinct use.
Hyphens v. dashes: this Purdue OWL webpage explains their purpose and when you should use them.
Hyphens overview: this resource lists various rules to follow when using hyphens.
Dashes overview: this University of Wisconsin-Madison Writing Center resource points out three benefits of using dashes in your writing.