The British put them outside the quotes, which seems much more logical.
The American style is to put the punctuation inside the quotes. The American version is often known as "Typesetter's Quotes".
As you can see, I go with the British version, at least in informal writing.
Interesting fact: They are called typesetter's quotes because when typesetters were laying out the typesetting blocks putting the small blocks for punctuation inside the quotes made the layout more stable and less prone to shift around. That's probably why it seems so illogical, it was done for mechanical reasons, not linguistic reasons.
It's allowed, but mostly inadvisable.
The times it is most allowable are:
You have a series of related questions:
Do you know what he was called? where he was from? who is people are?
Expressing uncertainty within a sentence:
This feeling, this anger? rage? fury? I am over-whelmed.
You are living in the 18th Century. (It used to be more common than now).
It can be confusing though. It's often a good idea to rephrase, especially in formal text because of this potential for confusion. I could easily rephrase my first example just by capitalising. Your example questions can be simply broken into sentences such as:
Can you explain this to me? I don't understand the second part.
Or expressed as a single question with a subordinate clause:
Can you explain this to me, because I don't understand the second part?
Or re-ordered:
I don't understand the second part; can you explain this to me?
My second example can't be re-ordered without losing the effect. This effect would only be suitable in some sort of writing anyway, and the choice is between keeping the risk of confusion, or losing the effect.
(And as for the spaces: Two spaces if you are writing on a manual typewriter something that you intend to be typeset professionally if published. One for all other writing. Typesetting, graphic use of text, and other cases where you're going to pay attention to the weight, block-size, kerning, extender-size relative to leading, etc. would include spacing in a variety of different cases as part of those considerations, but usually would be a space slightly larger than a "single space").
Best Answer
I'd be inclined to write it, as an instance of indirect, generic speech, and not a direct quote, as:
If you use quotation marks, the question mark definitely goes inside, as it marks what you're quoting as a question:
The question mark goes outside when what you're quoting isn't a question, but your statement about it is: