1An interjection expressing agreement or affirmation (yes).
「行きますか」「はい、行きます。」
"Will you go?" "Yes, I'll go."
店員に聞かれて『はい』と答えた。
I answered 'yes' when the clerk asked me.
会議で司会が同意を求め、全員が『はい』と言った。
The chair asked for agreement in the meeting and everyone said 'yes'.
2A response meaning 'understood' or 'I see' to show comprehension of instructions or information.
上司にやり方を説明されて『はい、わかりました』と言った。
The boss explained how to do it and I said, 'Yes, understood.'
先生の注意に対して生徒たちは『はい』と返事した。
The students replied 'yes' to the teacher's instructions.
3Used to indicate presence at roll call (present; here).
点呼で名前を呼ばれると、彼は大きな声で『はい』と答えた。
When his name was called at roll call, he answered 'here' loudly.
出席確認で全員が『はい』と返事した。
Everyone answered 'present' at the attendance check.
4A quick 'pardon?' or 'what?' used with rising intonation when you didn't hear or understand.
相手の言ったことが聞き取れず、『はい?』と聞き返した。
I couldn't hear what the other person said, so I asked, 'Pardon?'
急に名前を呼ばれて驚いて『はい?』と言った。
I was surprised when my name was called suddenly and said, 'Yes?'
5Used when handing something to someone or calling attention (here you go; here; now).
店員が商品を渡しながら『はい、どうぞ』と言った。
The clerk handed over the item and said, 'Here you go.'
子どもにお菓子を差し出して『はい、どうぞ』と言った。
I offered the snack to the child and said, 'Here you go.'
6A rare usage as a cue to urge animals forward (giddy-up/giddap).
乗馬中、馬を進ませるときに『はいっ』と声をかけた。
While riding, I said 'giddy-up' to urge the horse forward.