Colon vs semi-colon vs em dash.
I've been doing a bit of creative writing lately (nothing serious; just stuff for fun) and I've noticed that I use a lot of em dashes. Once I noticed this, I realized that I don't concretely know the difference between the usage of a colon/semi colon compared to an em dash.
Now, the way I understand it, a colon is used to "unpack" your sentence and give explanation.
"There are three types of Olympic fencing--foil, epee, and sabre."
A semi-colon is stronger than a comma but weaker than a period. It links together two sentences that could theoretically be joined.
"My opponent lunged and attacked; my only recourse was a counter six parry."
Now, the em dash. This one I am a little less sure about. I tend to use it a lot, even though I don't fully understand it. Sometimes I use it to qualify an action. EX) "Andy took a moment to examine what he’d grabbed—he’d been too busy studying Ryan to pay attention to what book he had picked up—then answered the question." Sometimes I use it to explain something that doesn't necessarily need a whole sentence devoted to it. EX) "Andy and Matt had their first class together--Ancient Philosophy." Sometimes I use an em dash to sum up an explanation or idea EX) "The rust brick walls of the dining hall seemed particularly dreary today. The skylights on the ceiling were darkened by heavy grey clouds, making the whole room particularly dim and colorless. Gilbert had felt the moisture hanging in the air as he and Francis had walked to the cafeteria—it was setting up to be a rainy day. " EX) "It was rather obvious that the two were not suited to be friends—their personalities were too conflicting."
Sometimes I use an em dash when I'm abruptly changing my tone, or stance in a sentence. EX) "There were no dark circles under her roommate’s eyes—or if there were, they had been carefully hid with a dab of makeup."
So, basically, I use an em dash when it "feels" right. I'm curious to know if I am correct, and what the actual grammatical usage of it is. Please feel free to correct any of my example sentences--it might make more sense to me that way since the examples were generated using my own confuzzled grammar ideas. Lastly, I am aware that an em dash can be used in text to show an abrupt change or interruption in speech ("I didn't--I would never," "But she said--").
TL;DR--What are the rules of grammar concerning an em dash?

