Tolstoy is expert at sketching character traits in just a few lines. His accounts of Petersburg hypocrisy, the desperate love between Anna and Vronsky, and the more sustaining and positive affection between Kitty and Levin, remain relevant today because they're so observant and incisive.
At the same time, Tolstoy is a moralist. The narrator isn't just making these observations to flesh out a good story: we're supposed to take something away from these character portraits. Even though we're left to pity Anna, there's tons of evidence that the novel doesn't exactly approve of what she's doing.
One of the strongest examples of this moralizing tone is available in Part 2, Chapter 11, after Vronsky and Anna have sex for the first time. This is what the narrator tells us:
[Anna] felt herself so criminal and guilty that the only thing left for her was to humble herself and beg forgiveness; but as she had no one else in her life now except [Vronsky], it was also to him that she addressed her plea for forgiveness. Looking at him, she physically felt her humiliation and could say nothing more. And [Vronsky] felt what a murderer must feel when he looks at the body he has deprived of life. (2.11.5)
We see here the two dominant tones of the narration: there's a lot of psychological observation and interest, and there's also distinct judgment going on. The tone of this passage is both perceptive – Anna's physical humiliation and Vronsky's shame are both vividly sketched and perhaps unexpected to the reader – and moralistic. We know that, if Anna feels so revolted by her own betrayal of her marriage, we should probably feel disgusted, too.
Moral commentary in this novel isn't reserved solely for Anna and Vronsky; Tolstoy criticizes the hypocritical and overly judgmental behavior of others, including Princess Betsy and Countess Lydia. Even though the mode of the narration is third person omniscient (for more on this, see "Narrator Point of View"), the tone of the narration is personal enough to be judgmental.