Giving your name
Nama saya Loïc. ‘My name is Loïc.’
Word order is the reverse of English: nama saya is literally ‘name my’. Indonesian puts the thing first and the owner second, and this pattern will follow you through the whole language.
Asking
Nama kamu siapa? ‘What’s your name?’
Note siapa ‘who’, not apa ‘what’. Indonesian treats a name as belonging to a person, so it asks who, and nama kamu apa sounds like you are asking what kind of object a name is.
The polite version
With someone older, a stranger, or anyone in a position of authority, replace the pronoun with their title.
Nama Bapak siapa? ‘What is your name, sir?’
Nama Ibu siapa? ‘What is your name, ma’am?’
This is softer than using kamu, and it is what you should default to until invited otherwise.
Opening the exchange
Kenalkan, nama saya Loïc. ‘Let me introduce myself, my name is Loïc.’
Then, after the exchange:
Senang bertemu dengan Anda. ‘Pleased to meet you.’
In speech this shortens to senang bertemu or disappears entirely in favour of a smile and a handshake, which in Indonesia is light rather than firm, often followed by touching your own chest.