"What is your name?"
For everyone just beginning to learn japanese, this is how the sentence works; If you were to write it in full, it would look like this: あなたの名前は何ですか。 (あなたのなまえはなんですか。) But because we are asking a question, it is obvious that we are talking to them (also its a little impolite to use あなた(you)(の is used to show possesion by the way, so its their name)) so its condensed to just お名前は何ですか。 The お is used to show respect, and is an 'honourific'. This basically means that the sentence is more polite. 名前 means name. は (pronounced wa not ha because it is a particle) is used to show that you are talking about their name. I learnt it as 'speaking of X...'. In this case it would be 'speaking of your name...' Because their name is the topic. は is always used to mark the topic, and particles always come after the word they are related to. 何 means what. です is not strictly nessacary, but makes the sentence more polite (and if you are asking someone what their name is you obviously arent particularly close so politeness is advised.). です has no true translation i believe, it just makes the sentence more polite. か is the question particle and is used so that the listener knows that you were asking a question.
And if it helps, the order of the sentence basically is: Speaking of your name, what is it?
Hope this helps :) if you've got any questions just comment and I'll try awnser.
Whilst a lot of what you said is correct I must point out that です should almost always be used in this case (especially for beginners). ですis known as the copula and it is the verb 'to be' and its usage does imply formality in some cases. There are certainly other occasions where you can drop this (if ending the sentence with an alternative verb, or conjugating adjective or in conversation with close friends and family members.) However, as you stated the implication of asking someone's name is that you are not familiar with them. I know (as a foreigner) you are excused from some aspects of the language and no-one would misunderstand you if you asked 'お名前は？' but if you are just starting out in Japanese then you should get in the habit of using です as it truly is ubiquitous in its usage. The Japanese language tends to hang on the ending of the sentence, for example the negative of ですis ではありません (deh(w)a arimasen). There are numerous occasions where I have seen someone pause in thought when I speak to them because I accidentally ommited the です. I will give you a basic example 'アメリカ人ですか？(Are you an American Person?' ’イギリス人…(British person...)’ Japanese is a very contextual language but many times you can visibly see the confusion on someones face when you do not include the ending because the setence could equally be 'イギリス人です (I AM a British person)' or ’イギリス人ではありません(I am NOT a British person)' or even 'イギリス人でした (I WAS a British person).' I hope my rambling is understandable, of course if anyone has more input or disagreements please reply and I will try and get back to you!
Very good. 何 is also not strictly necessary; neither is 前 in 名前. Thus, お名前は何ですか can be shortened to, 名は? (なは) or perhaps even simply 名 (though that is not recommended). The simple 名は? form doesn't lose meaning, it just drops formal conventions of communication and assumes the other person will understand you. Name?
In Japanese お can be added as an honorific. It is essentially to make things more polite. In the case of names you say お名前 when referring to someone else's name. It would be seen as strange to add an honorific for yourself so you dont add it. お名前何ですか。What is your name? 私の名前は... My name is
Instead of scaring you with a messy wikipedia page of various japanese particles, just know that は can be understood as topic marker and が is the subject marker. 私は猫が好きです=I like cats. I(私) am the topic and cats (猫) are the subject. Sometimes it not this clear but you'll begin to understand where and when to use these particles as you progress through lessons.
That sentence sounds like you are saying " 'What' is your name? ". In the same way that if someone said their name was Greg and you were worried you had misheard so you clarified 'Greg" is your name? Also, remember お名前。That お is important whent alking about someone elses name!
this is a pretty good lesson in the differences. https://www.youtube.com/watch?v=qrjHT8FAuWY&t=575s She explains things really well.
Heads up, its actually rude to say this since its sounds cold and distant. It would be better to say お名前は...？ Because this way the tone is softer and seems less harsh. Its somewhat like saying "Your name is..." and they just fill the blank. That is the end of my TED talk, thank you.
I would check you understanding with said teacher. If the meaning was that you could say 'お名前は？' then that's fine but there is certainly a need on a technical level for the 何 (Read as 'nan' in this case, not 'nani'. Otherwise you have an incomplete sentence 'お名前ですか？’ which would be like saying 'is your name?' in English. お名前は is accepted as colloquial usage, it is starting a sentence expecting the second party to answer. Kind of like saying 'Your name is...' and waiting for someone to reply. Interestingly enough this is also how we have the word こんにちは with the は pronounced as 'wa' as it really is a particle but now the word itself has become common usage. こんいち means 'this day'. It is the equivalent of saying 'This day is...' and waiting for someone to reply by saying it is sunny, or sad or whatever. But the word now just has the accepted usage as an equivalent of 'hello/ good afternoon'. So technically 何 is need, colloquially it is not.
I know it doesn't make much sense, but how would you say "whats is my name?"