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.
I think that you may be asking the wrong question. Unless your job is to punctuate someone else's writing without changing any of the words, your main responsibility to readers is to say what you mean coherently and accurately—not merely to say it in a way that you can justify on the basis of some theory of punctuation.
Commas are extremely flexible punctuation marks and can be useful for everything from demarcating major divisions between clauses to indicating parallel words (or word groups) to signaling a natural pause in speech. But overloading a sentence with commas negates their value as signals. Instead of helping readers follow the structure and flow of the sentence, the comma glut obscures the relationship of the various words and word groups to one another. Readers then have to stop and try to reconnect the disjointed pieces of the sentence. Or they stop reading.
As an experiment, I reworked your example twice—once retaining all of the original words but repunctuating the excerpt in an effort to make it read as coherently as possible, and once treating both the wording and the punctuation as subject to alteration. Here are the results.
Changes in punctuation only:
I think sometimes that my use of commas and, occasionally, exclamation marks can be excessive. Whenever I add a word or expression not necessary to the sentence, just like I did with the "not necessary" and like I am doing right now, I always include these words—well, maybe not "always"; "usually" include these inserts—between commas. So, basically, I enjoy writing long sentences joined with lots of commas and (frequently) semicolons and (often) colons—and have been rather prone to using brackets, as well.
When writing lengthy, detailed sentences, I find sometimes I can get carried—or at least I think I do—and can join two, three, or sometimes more usually related but separate ideas that could be separated into individual, perhaps less interesting, sentences.
This version of your original writing still suffers from a couple of lapses into incoherence that no amount of fiddling with punctuation can solve, which leads us to the second revision.
Changes in punctuation and wording:
Sometimes, I think, my use of commas and exclamation marks is excessive. Whenever I add a word or expression that is not necessary to the sentence, as I might have done with "not necessary" and as I am doing right now with this longwinded aside, I always (or usually) set off the words with commas. Basically, I enjoy writing long sentences and punctuating them with lots of commas, as well as with somewhat smaller helpings of semicolons and colons. I have been rather prone to using brackets, too.
When writing lengthy, detailed sentences, I sometimes get carried away and find myself joining two, three, or even more related ideas that could be separated into individual (though, perhaps, less interesting) sentences.
As the second reworking suggests, many of the commas in your original version were serving not to "join" related phrases, but to accommodate extraneous verbiage. Most writing that aims to communicate effectively with readers, rather than to display one's real or simulated stream of consciousness, resolves itself into coherent parts without intervention in the form of overwhelming punctuation.
Best Answer
Normally, direct speech should be quoted. But, as pointed out by Edwin Ashworth, thought are somewhat of an edge case so you may choose:
Quoting:
Notice the long dash in that case: ― (unicode U+2015), not - (minus).
Keep in mind that this is borrowed from foreign languages, and as such it does not follow the usual rules for dashes in English. In proper English, dashes are only used for interruptions in a sentence: marking a pause, introducing a subsidiary idea, etc.
Including in normal rhythm:
If I chose it not to be a quote, I would not put capital letters either, for it is no longer an independent sentence. But according to Edwin Ashworth you can get away with capitals too.
For reference, see this pretty thorough punctuation guide.