Sensei (せんせい) means “teacher”, and it is also the respectful title for doctors, lawyers, authors and other experts.
In anime the homeroom teacher is せんせい. So is the doctor, the karate instructor and the manga artist whose editor is begging for pages. One word, many jobs — because せんせい is less a job title than a way of showing respect.
What it actually means
せんせい is used for people who teach or who are looked up to for their expertise: school teachers and professors, doctors and dentists, lawyers, politicians, and authors and artists. You can use it alone, like a title, or after the family name.
The rule that surprises learners
You do not call yourself せんせい. It is a word of respect that other people give you. A teacher introducing themselves uses the plain job word instead.

せんせい、 しつもんが あります。
Teacher, I have a question.

はい、どうぞ。
Yes, go ahead.
How it sounds
It is written せんせい and romanised sensei, but the えい is said as a long “e”: sen-seh. If you say “sen-say” with a strong English “ay”, people will still understand you — it just sounds foreign.
Can you use it?
Yes, and you should. Use せんせい for your Japanese teacher, your doctor in Japan and your martial arts instructor, alone or after their family name. It is one of the safest, most useful polite words a beginner can learn.
