The above answer is correct - from my perspective it has limited use in Japanese culture however and in my work situation it is a word we never use.
1) in the workplace, senior people to you, even by 1 year *might* be your sempai, there to assist you with questions that you shouldn't bother your boss with, they play many other roles as well in the workplace from what I can tell as an outsider. they have a very specific relationship to you and your work. you wouldn't go around calling everyone senpai.
2) in martial arts training, this same relationship exists as well, certain senior students would be correctly addressed as senpai, but by no means would you call the instructor senpai, even though they are also senior to you.
From what I can tell it is really only reserved for special circumstances, you wouldn't call just any older person senpai.
again take all of this from an outsiders perspective, that's merely what I am and this is my limited understanding of the word.