It was certainly hard for Jem to comprehend at first, but I believe he came to understand the depths of Mrs. Dubose's courage after Atticus explained all the facts to him. Mrs. Dubose shows that even while facing death, she was willing to commit to completing the painful decision she had made: To kick the morphine habit that had plagued her for so many years. As Atticus explained,
"It's when you know you're licked before you begin but you begin anyway and you see it through no matter what.
Atticus himself tells Jem that courage is not "a man with a gun in his hand." He may have been referring to the adulation that the kids had heaped on him after he had shot the mad dog. He seems to have been telling Jem that Mrs. Dubose's courage far exceeded his own when he picked up a gun for the first time in many years. No doubt Atticus did not consider his act one of bravery, but of necessity.
Mrs. Dubose was addicted to morphine, However, she is determined to die without this addiction. Although she knows she is going to die and morphine would make her final days more comfortable, she does not want to leave this world reliant on this drug.
Atticus explains courage as knowing you are licked before you begin but forging ahead anyway. This is the case with Atticus taking on the Tom Robinson trial. More than likely, he knows he will not win the trail due to the racist attitudes of Maycomb; however, he still does the right thing by trying his hardest to defend and acquit Tom.