Ageism exists in To Kill a Mockingbird because it is told from the perspective of a child. For example, Scout narrates the beginning of chapter 10 like this:
Atticus was feeble: he was nearly fifty. (Chap. 10)
The entire chapter then begins to uncover the children's problems with their father's state because he doesn't play with them like other kids' dads play with them. This particular quote is ironic because 50 is hardly close to being a senior citizen.
The most specific chapter that covers the idea of ageism is chapter 11 with Mrs. Henry Lafyette Dubose. This passage from the beginning of that chapter uncovers some of the stereotypes children have of really old people:
She was very old; she spent most of each day in bed and the rest of it in a wheelchair. It was rumored that she kept a CSA pistol concealed among her numerous shawls and wraps.
Jem and I hated her. If she was on the porch when we passed, we would be raked by her wrathful gaze, subjected to ruthless interrogation regarding our behavior, and given a melancholy prediction on what we would amount to when we grew up, which was always nothing. We had long ago given up the idea of walking past her house on the opposite side of the street; that only made her raise her voice and let the whole neighborhood in on it. We could do nothing to please her.
I believe Harper Lee uses this chapter to demonstrate that just like blacks and whites have a hard time understanding each other, so do people of different generations. This chapter further illustrates that we can learn things from other generations. Jem and Scout learned that it takes courage to live with pain.