Sensei is the Japanese form of the Chinese concept rendered in Mandarin as shifu. The basic meaning is "master," in the sense of one who has mastered a skill. It does not necessarily imply a teacher, though the teaching connotations are stronger in Japanese than in Chinese. And it definitely doesn't imply a martial arts teacher, Mr. Miyagi notwithstanding.

The characters for "sensei" actually correspond to "xiansheng" in Mandarin--a fairly neutral title (gentleman) that's more like "mister" than "sensei."