"How do you do?" is similar in meaning to: "Pleased to meet you", "Good day to you", or "How are you?"
It's one of many possible greetings you can say. It is usually reserved for more formal contexts, particularly when you have not met the other person before.
Although it is presented in the form of a question, it's not really a genuine question. It's more of a formality used to acknowledge the other person.
For example, you can respond back to "How do you do?" with "How do you do?" or "Pleased to meet you". If you really want to answer the question, you can say something like "I'm well thank you, how are you?"