1. The opposite of jealousy.
2. The positive feelings one gets when a lover is enjoying another relationship.
The term compersion originally comes from the polyamory community, where people may have multiple intimate relationships at the same time, with the knowledge and consent of all partners. In these situations, jealousy may be a natural human reaction. Compersion and jealous feelings can certainly coexist, but jealousy can often be mitigated by self-examination, and compersion can be learned.
Another term — related to compersion but broader — is “Mudita”, a Buddhist term that roughly means sympathetic joy, rejoicing in others’ good fortune. Basically, if you have a sort of inner joy or inner comfort with yourself, you are secure enough to relish the joy of others. You take pleasure in their pleasure, for its own sake, not for any relation to your own state. Compersion, then, can be thought of as an analogue of Mudita specifically applied to your loved ones: feeling secure against jealousy in your relationship such that you derive happiness from your partner’s happiness, even when that comes from outside.