he ... to the teacher / he is ... as a teacher彼は means “he,” while に changes meaning according to the following verb: in 先生にいくつか質問をした, it marks the person being asked; in 先生に向いてない, it means “suited to being a teacher.” This is an incomplete phrase rather than a fixed expression.