Compassion means, quite literally, to 'suffer with' others. It is, therefore, a sense of fellow-feeling with other people's pain or suffering.
Compassion is caring about others and behaving toward them with affection, generosity, and concern. Compassion is not the same as empathy (where you put yourself in someone else's shoes); it's about having genuine feelings for other people's struggles.
It's the result of seeing someone suffering, deciding that they do not deserve it, and feeling that something similar could easily happen to you, or to someone that we care about. It often leads us to take some action to help that other person.