The exact meaning of magistrate varies widely depending upon the context. For example:
in the U.S. federal court: assists district court judges by handling minor offenses or administrative tasks such as preliminary hearings (often referred to as a magistrate judge rather than just a magistrate)
in some U.S. states: a judge in the state court
in France, Belgium, Italy, the Netherlands, and other civil law countries: a sitting magistrate is a judge and a standing magistrate is a prosecutor
in England: may be a volunteer without formal legal training who performs a judicial role with regard to minor matters
in ancient Rome: a powerful officer with both judicial and executive power
He seems to have overdone it with a couple of young recruits on the ploughed field at home and unknown to him the son of the local magistrate was watching.
Chapter 5 (5% in)
There are no more uses of "magistrate" in All Quiet on the Western Front.