The em-dash (which is different from a hyphen), ironically, has a hyphen in its name. Em-dashes are used in place of parentheses or as an alternative to a comma, semicolon, or colon. If that sounds confusing, that’s okay—you’re not alone.
The OED recommends avoiding em-dashes in formal writing, but you will find many preeminent authors (particularly in the first half of the twentieth century) throwing them around all willy-nilly.
Don’t worry though, you can go your whole life without using an em-dash and nobody will notice. It’s an odd-enough piece of punctuation that you won’t find it on most keyboards, so unless you know the keyboard shortcut for it (or compose key combo or unicode) you won’t ever use one. Just know that it indicates a separate clause from the rest of the sentence.
Example: “Now did he perceive who aforementioned had wrought the race of men many a grief and heart of wrong—he had a feud with God—that his body’s might would not avail him, but the valiant kinsman of Hygelac had him by the arm—hateful to each was the other’s life.” – Beowulf translated by J.R.R. Tolkien