师兄 is used in traditional apprenticeship, martial arts schools, and academic contexts. It denotes someone who studied under the same teacher but started earlier. The female equivalent is 师姐 (shījiě).
memory
师 (teacher/master) + 兄 (older brother) — your older brother under the same master.