Sensei uses two kanji characters to create the word compound. The first character, 先, means “previous” or “former.” The second character, 生, means “life/to live.”
You could translate the combination many ways, but I like to think of it as “former life,” as in someone who has a lot of experience to their name. A common usage of sensei in Japanese culture, of course, often refers to a teacher/professor. After all, a teacher or professor is someone who is knowledgeable because they are sharing their wisdom with others.
Sensei can also be used outside of the classroom for other people who are highly regarded, such as doctors and other professions you respect. This is why sensei is often translated as “master” in certain context, due to the level of admiration the title connotes.
Also, I have to throw out there that you would use sensei in a reverse order in standard Japanese, based on the grammar structure of name honorifics.
Correct: X person’s name (usually last name, but first names can also be used) followed by sensei. Example: Smith-sensei.
Incorrect: Sensei-Smith. <— Wrong.
Do you ever call anyone 先生?
Now you know. >^..^<