In Germany there are three common ways to ask for someone's name.
Wie heißt du?
This literally means 'How are you called?', the appropriate response is:
Ich heiße ______ (name).
Also, you can say:
Wie ist dein Name?
This is word by word 'What is your name?'. The answer to this question is:
Mein Name ist ______(name).
Another way to ask for someone's name is:
Wer bist du?
It actually means 'Who are you?' and in the answer to this question you can put some additional info about yourself, eg. your job:
Mein Name _____ (name), ich bin _____ (job, etc.).
In the most cases, you can use any of these answers to respond to all of these questions, so you can talk more diversified.