You often use it to start a conversation, like saying 'nice to speak to you again' you can also use 'how are you doing'. Literally you are asking how someone is feeling, in a real conversation you'd say I'm good and then continue the conversation. When someone is ill for example and you ask 'how are you doing' you are asking for his/her state and you can expect a reply in which the person will explain how he/she is feeling. In the beginning of a conversation it's not a question like this, it's just a nice way to start a conversation. Hopefully this helps you!