First of all," he said, "if you can learn a simple trick, Scout, you'll get along a lot better with all kinds of folks. You never really understand a person until you consider things from his point of view […] until you climb into his skin and walk around in it." (3.85-87)
Atticus's advice "to climb into someone's skin and walk around in it" is a little more Silence of the Lambs than the typical advice to walk a mile in someone's shoes, but the idea is the same: compassion is based on sympathy, on being able to put yourself in the other person's place and understand why they act the way they do even if you don't agree with it.