These two questions have totally different meanings and are used under different situations.
You use "Where do you come from?" when you wants to know someone's nationality. E.g. I am from Hong Kong. You can always say" Where are you from?"
When you ask "where did you come from?", you are actually asking where the person was before engaging in conversation with you.