She talks to him as if he were a child.

Literal

She [topic-は] him [toward-に向かって] just-like-まるで he [subject-が] child is [as-if-かのように] talks.

Two complementary patterns. ~に向かって ('toward, facing') gives directionality of the speech — 'speaks toward him.' まるで~かのように ('just as if, exactly as if') is a hypothetical-similitude construction: まるで sets up the simile, ~かのように attaches a counterfactual clause as the manner adverbial. The pattern is more emphatic and explicit than plain ~のように, often signaling that the comparison is unrealistic or vivid.