schoolmate
A person who goes to the same school as you.
A schoolmate is someone who attends the same school as you. Your schoolmates might be in your grade, a year ahead, or a year behind. Some might be in your classes, while others you only see in the hallways or at lunch.
The word captures something important: you and your schoolmates share a common experience. You navigate the same building, eat in the same cafeteria, follow the same schedule, and learn from the same teachers. A schoolmate might become a close friend, or they might just be someone you recognize and wave to occasionally. Either way, you're connected by being part of the same school community.
Similar words like classmate (someone in your specific class) or teammate (someone on your sports team) are more specific. Schoolmate is broader: it includes everyone from the kid you sit next to in math to the eighth grader you've never actually talked to but see every day. When you look back years later, you might say “we were schoolmates” to describe anyone who went to school with you during those years, even if you weren't particularly close.