I cannot really answer in terms of proper, correct or official style rules but here are the basics of how to choose what to do.
Minimize the amount of punctuation visible. If you can eliminate a "duplicate" mark, do it.
When removing extraneous marks, work from the outside inward. Marks outside of quotes get hit first.
If at all possible, move mark to inside the quotes but never change the meaning of the quoted section.
Did you know how he asked me "how do you do?"?
The extra '?' can be removed. Leave the internal '?' alone:
Did you know how he asked me "how do you do?"
After he said "Do I know you?", we hit him with some bricks.
This is probably controversial, but the comma is fair to remove:
After he said "Do I know you?" we hit him with some bricks.
"Fool!" he exclaimed.
This is fine.
Other examples of how I would do things:
He yelled, "I want cake!"
He asked, "Do you want cake?"
Did he ask, "Do you want cake?"
I cannot believe he said, "I do not want cake"!
Note the exclamation point outside. I am exclaiming; the fool who passed on cake was simply talking. If the cake hater was also yelling we could do this:
I cannot believe he said, "I do not want cake!"
This is slightly ambiguous with regards to my exclamation but I find it acceptable.