“Pity” is an emotional response.
“Compassion” is the will to help if one can.
You see a wet, bedraggled, hungry cat in your front yard.
“Pity” says, “Aww, the poor kitty. It’s such a shame nobody’s taking you in.” If someone suggests that “pity” take the cat in, the answer is, “Oh, but it’ll track all over my clean carpet. And it might have fleas. And it’ll smell!”
“Compassion” sets out some canned tuna for the cat, and puts a wooden box next to the wall of the house so the cat has some shelter from the rain. “Compassion” then checks round the neighbourhood in case somebody owns the cat. If nobody does, then “Compassion” tries to catch the cat and take it to an animal shelter.
That’s the difference. “Pity” is a feeling. “Compassion” will help if it can.