Jem had destroyed several of Mrs. Dubose's camilla flowers. For punishment, Jem was asked to read daily to Mrs. Dubose until her alarm clock sounded. Jem found himself reading more and more every day as the clock took longer and longer to actually go off.
Mrs. Dubose had been trying to free herself from her addiction to morphine. To do so, she used Jem's reading to distract her from her pain, and by the time she died, she was free. Atticus used this scenario to teach the children that courage is a value to admire and that it takes hard work to be courageous. But, in the end... it's worth it. Real courage isn't shooting things... it is doing what is right.
Jem destroys all of Mrs. Dubose's camellia bushes, which she adores, because she is an unlikeable person who is constantly criticizing Scout and Jem and berating Atticus for defending Tom Robinson, who is African-American. To punish him, Atticus makes Jem read to her every day for a month.
At the beginning of Chapter 11, Scout narrates the following about Mrs. Dubose:
"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" (page numbers vary according to the edition).
Mrs. Dubose seems like a hateful woman, and she regards Scout and Jem as entirely unpromising.
When Jem has to read to her, Scout and Jem regard her with distaste. Her house smells bad, and she has saliva on her mouth. She also spends a great deal of time berating the children. After Jem spends a month reading to her, his penance is over.
Atticus tells Scout and Jem a short while later that Mrs. Dubose has died and that she was addicted to the drug morphine but kicked her addiction before she died. Atticus explains in Chapter 11:
“She said she was going to leave this world beholden to nothing and nobody. Jem, when you’re sick as she was, it’s all right to take anything to make it easier, but it wasn’t all right for her. She said she meant to break herself of it before she died, and that’s what she did” (page numbers vary according to the edition).
Mrs. Dubose could have taken morphine until she died, but she decided to go through a great deal of pain and agony by choosing to quit. Jem's reading to her to help her pass the time and forget about her pain. Through his experience with Mrs. Dubose, Jem realizes that even people who seem detestable have secret struggles that others don't know about and that everyone deserves empathy and understanding, even those who don't at first seem likable or understandable.