This is a short lesson to learn how to introduce yourself in social circumstances.
To ask somebody's name, you could ask:
This is the formal way to ask.
But you can also ask in a more unformal way (when?) like
And here's how you'd say "my name is John".