Let us start at the beginning. So often I notice in my classes, that even higher level students get confused between those first questions in a conversation.
How do you do?
How are you?
What do you do?
So let's look at the first question: "How do you do? ". This is really not used anymore as a formal greeting. Most native speakers prefer "Nice to meet you". Which you then answer with " Nice to meet you, too".
"How are you?" is used when we have met someone before, normally after saying " Hello". For example " Hi Anya. How are you?".
" What do you do?" always means " What is your job?".