One of the problem with the Japanese language is that the difficulty is not always where you expect it. For example, there is 0 spelling problems in Japanese. There is only one way to write words and they will never wonder if you need 1 or 2 'm', 1 or 2 'p'. How many times have I seen people write "there" instead of "their" or "would of" instead of "would have". This would not happen in Japanese. On the other hand, some basic words may be problematic. Today, I would like to talk about "yes".
How to say "yes" in Japanese? If you look in a dictionary, you will find the "translation" はい (hai). This is a good translation but there are some small details I would like to discuss.
In the English "Yes, I do", we use "do" no matter the verb of the question (except for some verbs like can, shall, would, ...). In Japanese, they simply repeat the verb of the question.
Do you play tennis? Yes, I do
tenis wo shimasu ka hai, shimasu
If the Japanese verb is です (desu), you need to add そう in the answer
Is this your cat? Yes, it is.
anata no neko desu ka hai, sou desu
In Japanese, people also use はい, more often than in English, to simply acknowledge what their interlocutor says, kind of showing their are listening and want their interlocutor to continue speaking. It is difficult to describe with words but if you listen to Japanese people, you will notice it.
If you try to say you have a problem with your internet and say this:
inta-netto no mondai ga arimasu
Your interlocutor may simply reply:
Basically, you are saying you have a problem with your internet and the other person is replying "yes". It does not mean "yes, you have a problem", but more inviting you to continue (describe more the problem, tell what you expect, ...). If you wanted your interlocutor to take action directly, you should actually have said:
inta-netto no mondai ga arimasu ga
More on this, here.
There is also うん (un), more familiar, which in practice is just a mumble. Again, it is possible to repeat the verb of the question.
Did you see this movie? Yes, I did
kono eiga wo mita un, mita
It is possible, and quite common to omit うん. In the previous example, we could say 見たよ (mita yo) or 見た、見た (mita mita).
To conclude, let's just say that はい in formal situation is a good translation of yes. Simply, in Japanese, it is more common to follow it with the verb of the question. In informal situations, yes is translated into うん but may be eluded and the answer will only be the verb of the question in the affirmative form.