An interrogative sentence is formed by adding the question marker か to the end of a statement. はい is used at the beginning of affirmative replies to questions.
A: あなたは ジョンさんですか。
Are you John?
B: はい、わたしは ジョンです。
Yes, I'm John.
さん is a polite suffix attached to people's names(surname, given name, or surname + given name). Note that さん is never used with one's own name.
せんせい, which means "a person who teaches", can be used to refer to any teacher-for instance, a kindergarten teacher, elementary school teacher, or a college professor. When speaking to a teacher, the address term should be: surname + せんせい. Do not use ～さん to address your teacher.