>_>
It's a japanese honorific used for your seniors or someone of higher rank than you in school, dojo, sports club, etc. It's used out of politeness and a subtle form of respect.
Basically a Senpai has more experience and can be learned from in some manner.
A teacher or work boss however is not a Senpai, but a Sensei.
A Sensei is anyone with some form of mastery in their field or at the top of something.