I don't think I was ever taught a clear-cut rule, and as a non-native speaker, I am probably spoiled to some extent by the usage of dashes in other languages. That being said, following nothing but my intuition I would use:
- a semicolon when the sentences express related, yet independent (especially grammatically independent) thoughts; they could well stand on their own, separated by a period.
- a dash when the second sentence backs up the first one, nails it down to something, restates or amplifies it, provides reasons or examples, or when the second sentence could not stand on its own "as is" for grammatical reasons.
I will try to demonstrate my point by rewording the notorious examples from The Oatmeal accordingly.
- My aunt had hairy knuckles; she loved to wash and comb them.
- My aunt had hairy knuckles — she suffered from hirsutism.
- When dinosaurs agree on something, they'll often high-five one another; dinosaurs are all about high-fives.
- When dinosaurs agree on something, they'll often high-five one another — they cannot talk and have to resort to gestures.
- I gnaw on old car tires; it strengthens my jaw so I'll be better conditioned for bear combat.
- I gnaw on old car tires — to strengthen my jaw so I'll be better conditioned for bear combat.
Again, this is just my two cents, and I'm only putting them in because the other answers so far seem to miss the point of your question by focusing on non-sentential relations and sometimes not even mentioning semicolons at all. I don't know whether my answer comes close to being correct or not, but I hope it will at least serve as a turning point for getting the discussion back on topic.
Dashes can be used in place of parentheses to indicate an aside or qualifying statement. I don't think either has a place in any of your examples.
Generally speaking, for the same reason you're having a hard time understanding their use, it's a good idea to avoid using semicolons altogether. The semicolon is intended to separate two sentences where the second sentence clarifies or extends the first. In practice, they're often used incorrectly and there is ample evidence that they confuse readers and translation software. A comma or period would often suffice.
It's good advice to use the simplest punctuation possible. That often means using the simplest sentence construction possible as well. Here is how I would punctuate your examples:
English is not my first language. I'm having trouble understanding the punctuation, specifically semicolons and dashes.
Note here that the wording is more specific so that the second clause merely clarifies. It could be thought of as a contraction of this more verbose version:
English is not my first language. I'm having trouble understanding the punctuation. Specifically, I'm having trouble understanding semicolons and dashes.
Or, if you really felt the need to use that spare semicolon:
English is not my first language. I'm having trouble understanding the punctuation; specifically, I'm having trouble understanding semicolons and dashes.
Your second example is fine as is; it's completely clear in meaning as two sentences (see what I did there?).
Your third sentence provides a great example of the many ways to associate two sentences. The first is very clear, but awkward and wordy. The second is probably most confusing to readers because the second sentence is quasi-grammatical. "it" implies "The question" here. The third is a rather elegant construction to my native English comprehension. Does the conjunction "but" imply the same meaning to you, however?
The question isn't what you can take away from this. The question is what you can learn in the process.
The question isn't what you can take away from this; it is what you can learn in the process.
The question isn't what you can take away from this, but what you can learn in the process.
These all mean exactly the same thing. From your perspective, take the construction that makes the most sense and use that consistently in your writing. Much great writing can be done without any semicolons at all.
Finally, note that your last example is a rhetorically loaded construction in English. I'm sure "Not this, but that" phrasings are encountered in many languages. Here's a famous example:
Ask not what your country can do for you. Ask what you can do for your country.
In these cases, simple, repeated, parallel constructions work in your favor in spite of the punctuation:
It was the best of times, it was the worst of times, it was the age of wisdom, it was the age of foolishness...
Be clear. Be consistent. Remember that many writers don't actually know the rules of punctuation. My apologies for rambling.
Best Answer
Personally, I don't think that either a semi-colon or an en-dash is appropriate in your examples. I would use a colon or an em-dash. (I also don't think that an en-dash v. and em-dash is an American v. British issue: they have different purposes (see http://www.chicagomanualofstyle.org/qanda/data/faq/topics/HyphensEnDashesEmDashes/faq0002.html).)
A semi-colon is part-way between a comma and a full-stop: it is not for juxtapositioning two clauses in the way you have -- that requires a colon or an em-dash!
This article http://www.thepunctuationguide.com/em-dash.html has a useful summary about em-dashes v. colons and other punctuation.