How the town treats Atticus changes dramatically once he takes on the defense of Tom Robinson. Prior to that, he is respected around town as an intelligent and capable lawyer. There are those who consider his methods of raising his children as unorthodox, but in general they don't feel it their place to meddle.
But once he decides to defend Tom Robinson, and in particular when he works very hard to try and prove his innocence, the town turns on Atticus. It gets to the point that some of the men are ready to harm him as they are intent on lynching Tom Robinson and Atticus is at the jail to protect him. His stalwart defense of Tom in the courtroom turns much of the town against him as they are unwilling to confront their own prejudice and hypocrisy.
There are those who remain loyal to Atticus, Calpurnia and her friends and family and Tom Robinson's wife, then widow. And there are certain townspeople like Bob Ewell who have always hated Atticus and use the excuse of the trial to attack him.