A
senpai is a
senior or
elder. Anyone you go or went to school with or work with or used to work with who started before you. Also, anyone who is older than or further progressed in something than you.
The best example I can give you is that everyone in E2 that is of a higher level than you is your senpai. Everyone that is lower than you is a kouhai.
You might even remember Sean Connery talking to Wesley Snipes about the senpai and kouhai relationship in the movie "Rising Sun".
The senpai is always supposed to look after and help the kouhai when in need. The kouhai looks up to the senpai and tries to emulate him/her.
Not all senpai are very good though. They sometimes take advantage of their position over their kouhai. For example, my senpai used to call and disturb me late at night while I was sleeping. He always talks to me in ways to remind me of my kouhai position and always wants me to introduce girls to him. He even starting going out with my hitomebore girl. All because we grew up in the same area of Kanagawa prefecture, went to the same college where he graduated a year before me, and he is 2 years older than I am. Everyone remarks that he is just old-fashioned and say nothing, but I think he is just a prick.
Senpai is written in kanji and is a noun.