der Mitschüler
classmate
A male person who attends the same school or class as you.
Er hat sich mit einem Mitschüler für die Projektarbeit zusammengetan.
He teamed up with a classmate for the project work.

classmate
Loading your saved state.
classmate
A male person who attends the same school or class as you.
Er hat sich mit einem Mitschüler für die Projektarbeit zusammengetan.
He teamed up with a classmate for the project work.

The word is made up of the prefix 'mit-' (together) and the noun 'der Schüler' (the student/pupil). A Mitschüler is therefore literally a student who attends school together with you.
Mein bester Freund war auch mein Mitschüler in der Grundschule.
My best friend was also my classmate in elementary school.
'Der Mitschüler' (the classmate) is a noun of the n-declension. This means it takes the ending '-n' in all cases except the nominative singular.
Hast du den neuen Mitschüler schon kennengelernt?
Have you already met the new classmate?
This word is used exclusively in a school context to describe boys or men who attend the same class or school.
Er hat seinen Mitschülern bei den Hausaufgaben geholfen.
He helped his classmates with their homework.
student / pupil
'der Schüler' and 'der Mitschüler' both belong to the school context. 'Schüler' is the general word for a person who attends a school. 'Mitschüler' is said from another person's perspective when both people attend the same school or class. So you can be a Schüler without being a Mitschüler of a particular person. The confusion arises because every Mitschüler is also a Schüler, but 'Mitschüler' always means sharing a school or class with someone.

Nach der Pause erklärt mir ein Mitschüler die Matheaufgabe noch einmal.
After the break, a classmate explains the math problem to me again.
Julian ist ein ruhiger Schüler und meldet sich nur selten im Unterricht.
Julian is a quiet student and rarely raises his hand in class.