Atticus makes this statement in chapter 9. This is a crucial point in Atticus’ attempt to get Scout to understand the nature of right or wrong as it relates to the Tom Robinson case. Scout has been hearing talk about Atticus and his defense of Robinson at school. It’s hard for her to understand that Atticus is doing the right thing when so many others are saying he’s not.
When she asks, “. . . are we going to win it [the case],” Atticus is truthful with his response. He is trying to express the idea that winning is not the only value in trying to do something. Simply trying to do the right thing is worthwhile even if the results don’t appear to warrant it.
The value of Atticus’ work in this case was expressed shortly before this point when Scout asks why Atticus is defending Tom Robinson even though so many folks feel that he's doing the wrong thing. Atticus responds with:
“For a number of reasons. The main one is, if I didn’t I couldn’t hold up my head in town, I couldn’t represent this county in the legislature, I couldn’t even tell you or Jem not to do something again.”
In other words, a man has to live with the decisions he makes and the actions he takes. You can't expect to live one way and talk another.
In Chapter Nine of To Kill a Mockingbird, a boy named Cecil Jacob declares that, "Scout Finch's daddy defends n*ggers," after hearing that Atticus had been appointed as the defense attorney in Tom Robinson's case. Scout goes home and reports this to her father, who then explains the details of the case to her: a black man named Tom Robinson has been accused of raping a white woman, Mayella Ewell (although Atticus simply refers to this act as something that Scout is not yet "old enough to understand").
Atticus explains that he must defend Tom because it is the nature of his work as a lawyer and tries to prepare her for the fact that she will likely hear some "ugly talk" about it in the future. When Scout asks Atticus if he is going to win the case, he responds that he won't but that it is necessary to defend Tom anyway, stating:
Simply because we were licked a hundred years before we started is no reason for us not to try to win.
What Atticus is saying here is that it is a mark of weakness for one to quit before trying just because one already knows the outcome of a challenge. To defend Tom--despite knowing the odds that he is up against in a racist town in the South--is a valiant act, one that sends a message about the validity of a black man's life at a time when black communities are persecuted. The objective of this case is not to win; it is to exercise an individual's right under the law to a fair trial. Although Tom's trial will not be "fair" due to the fact that he is being pinned under the oppressive thumb of a white judicial system, he will at least have the opportunity to have his voice (and side of the story) heard. In this way, defending Tom is providing some small sense of justice to his family and community.