In To Kill a Mockingbird, Atticus teaches by words and example. In Chapter 23, when Jem is worried about Bob Ewell exacting revenge, Atticus teaches him to think from Bob Ewell's perspective. "So if spitting in my face and threatening me saved Mayella Ewell one extra beating, that’s something I’ll gladly take." Rather than retaliate, Atticus considers how his pacifism might benefit Mayella. Atticus always considers things objectively and he always considers how others might think and/or be affected by what he says and does.
Atticus does the same thing with Mrs. Dubose in Chapter 11. Even though Mrs. Dubose makes hateful and racist comments about him and is generally an unpleasant person, Atticus is still able to consider her position. At the end of the chapter, after Atticus tells Jem she's died, he calls her "the bravest person I ever knew" because she chose to break her addiction to morphine even though she knew she was going to die.
This is a consistent theme in the book, one largely portrayed and described by Atticus. That is to consider the perspective of others despite what you may think of them. Atticus is also the moral backbone in town and this is why he's chosen to represent Tom. He is a good father because he never contradicts himself; he never says things like "do as I say, not as I do" because his words and actions are consistently guided by logic and morality.