Chapter 11 of To Kill a Mockingbird by Harper lee is the Mrs. Dubose chapter of the novel, and though Scout is usually the one who needs to hear her father's advice, it is Jem who is the recipient of Atticus's words of wisdom regarding their cantankerous neighbor.
Mrs. Henry Lafayette Dubose is, well, a crabby old woman who feels the need to spout crude things at Jem and Scout about their father as well as make wild characterizations about them. It would not be so difficult if they did not have to walk past her house to get anywhere into town, including meeting Atticus when he is coming home from his office. Nearly every night when Jem meets Atticus, he can see that Jem is fuming about something the old lady on the porch hollered at the children.
By this point in the novel we know Atticus well enough to predict that he is not going to overreact or take Jem's side in this. Instead we expect him to be a gentleman, and he is. This is the advice he gives Jem:
“Easy does it, son,” Atticus would say. “She’s an old lady and she’s ill. You just hold your head high and be a gentleman. Whatever she says to you, it’s your job not to let her make you mad.”
It is very good advice, of course, but it is much easier to say than to do, and Jem loses his temper. I assume this is the advice to which your question refers, as it is given in direct response to the taunting Jem endures from Mrs. Dubose.
Twice more in this chapter with Mrs. Dubose, Atticus gives Jem some advice about how to cope with people and how to judge them based on something more than appearances. After Jem has destroyed the woman's camellias in a rage, Atticus learns about it and gives Jem this advice:
"I strongly advise you to go down and have a talk with Mrs. Dubose,” said Atticus. “Come straight home afterward.”
This is obviously more like a command, but he couches it in the form of advice.
After the entire incident is over and Atticus explains Mrs. DuBose's circumstances, he advises Jem to think differently about what courage is. He says:
I wanted you to see something about her—I wanted you to see what real courage is, instead of getting the idea that courage is a man with a gun in his hand. It’s when you know you’re licked before you begin but you begin anyway and you see it through no matter what. You rarely win, but sometimes you do.
In between these bits of advice to Jem, Atticus also shares a little advice with Scout; however, this time it is primarily Jem who needs to hear and internalize his father's wisdom about people and about life.
If you're interested in more interesting insights and analysis on this classic novel, be sure to check out the excellent eNotes sites linked below.