In the "good" end, Tomoya had his brain badly damaged from falling. He was fine for a while but he became somewhat amnesiac afterwards (his memory starts from grade 9 in secondary school), and he was only able to store new memory for exactly one week (after a week his memory would reset to grade 9 again). Tomoyo has been taking care of Tomoya in such state for 3 years. So in order to remember his love to Tomoyo, Tomoya proposed to her and they got married. The damage, however, could be operated on and be repaired (VERY slim chance of success). Now in order to be able to make new memories, Tomoya decided to take the operation.
The operation failed, and Tomoya got paralyzed. Good news was that Tomoya got his memory back. After a few years though, Tomoya died with a smile. The last scene they saw together was a beautiful sunset, and this supposedly made Tomoyo realize that every happiness and sadness they experienced together up to this point was to experience this beautiful moment. Because of all the agony she experienced in the past, she could now see the life as a wonderful thing (supposedly by comparing it to the agony she experienced when Tomoya died).
In the bad ending, Tomoyo becomes sex crazed (she was somewhat mentally delusional from the event of the first half of the game) and lives a pointless and delusional life along with depressed Tomoya and their adopted daughter (she was the key main heroine in the first half).