The kids think that Mrs. Dubose is terrible. They have their own stereotype against her because she is just mean and old. Children tend to have fears of the elderly because their aren't often exposed to the elderly and being generations apart, they don't understand what old people experience, nor can they relate to pain or generations gone by. They are prejudiced toward her.
The town has a prejudice for Tom Robinson. Clearly the kids are coming to understand that as they experience more and more comments from adults.
Atticus wants the children to understand that you don't pick and choose who you defend when you are a lawyer. Atticus sees people as inherently good. He can certainly find flaw with folks, but he forgives their flaws. He chooses to focus on the good. Atticus truely believes in Tom and trusts the testimony that Tom is preparing to be truth. Atticus' knows Tom is a good man. He is trying to help the kids see that we can't judge people based on our own bias. Their bias against Mrs. Dubose is only founded on their experiences with her that were in the end of her life and often influenced by pain. Atticus had a broader life experience from which to choose for drawing his perceptions of her.