What does 'How do you do?' exactly mean?
The sentence How do you do? is used as a response when you are introduced to someone. (It is not used as a greeting with someone you already know.)
If I were you, I wouldn't worry too much about the literal meaning of "How do you do?", although it is probably an older relative of "How are you doing?".
The literal meaning is not so important - the function of this sentence is what's important. Instead of saying "How do you do?" you can also say "It's nice to meet you."
The literal meanings of these two sentences are different, but the function is identical: a standard response to an introduction.
Hope this answers your question