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
The answers were all based on official data furnished by governors and heads of churches, and founded on the reports of district magistrates and ecclesiastical superintendents, founded in their turn on the reports of parochial overseers and parish priests; and so all of these answers were unhesitating and certain.
Part Four (21% in)
There are no more uses of "magistrate" in Anna Karenina.