The short answer is that they both understand that Atticus is fighting for what's right, which is a step toward their maturation. The slightly longer answer is a bit complicated, because the two children respond in different ways. Jem is at first in awe of his father. He is older than Scout, and in some ways grows up more quickly than she. He is the first to call Atticus "a gentleman", & he doesn't have any moral issues with his father defending Tom. Jem knows Atticus is doing what's right; in fact, he's so sure that everyone will see the truth, he thinks Atticus will win the trial. However, he is also angry at several points. He is furious the night of the mob, when the men approach Atticus at the jail. He doesn't understand how Atticus can forgive Mr. Cunningham, explaining his racism as a "blind spot". He is also upset after the trial, feeling as though his father risked everything for nothing.
Scout is also angry, but for reasons she doesn't understand. She is upset that people call Atticus racist names, & look down on the family for his choice. She gets in several physical altercations because of this. However, like Jem, she knows that what Atticus is doing is right. She is proud of her father for doing the best he can in the face of such extreme opposition. Also, because she's younger than Jem, she more willingly accepts the lessons Atticus attempts to teach. Overall, both children are proud of their father, and know he is doing the right thing.
In the book "To Kill a Mockingbird" Atticus defends Tom Robinson, a black man, who has been accused of raping and beating a white girl. Atticus takes a risk by taking on the case. When his children ask him why he took the case, he tells them because it was the right thing to do. Atticus' relationship with Scout and Jem has already been a unique one. He had them when he was older; his wife died, and has raised them with Calpurnia's help. He reads to them and communicates with them at his intellectual level.
A crowd gathered around Atticus at his home. The children are watching from inside. This is the first time that they recognize the severity of their father’s choice to defend Tom.
"You’ve got everything to lose from this, Atticus. I mean everything.”(146)
The children question their father about the men wanting to hurt him. Atticus tries to play the situation off. He tells them that there are no mobs in Maycomb. The children go in their room to talk about their father. Scout tells Jem that she is scared. Jem is non-responsive.