The Buddha taught that to realize enlightenment, a person must develop two qualities: wisdom and compassion. Wisdom and compassion are sometimes compared to two wings that work together to enable flying, or two eyes that work together to see deeply.
In the West,they're taught to think of "wisdom" as something that is primarily intellectual and "compassion" as something that is primarily emotional, and that these two things are separate and even incompatible. We're led to believe that fuzzy, sappy emotion gets in the way of clear, logical wisdom. But this is not a Buddhist understanding.
The Sanskrit word usually translated as "wisdom" is prajna (in Pali, panna). I understand this word could also be translated as "consciousness," "discernment," or "insight." The many schools of Buddhism understand prajna somewhat differently, but generally we could say that prajna is understanding or discernment of the Buddha's teaching, especially the teaching of anatta, no self.
The word usually translated as "compassion" is karuna, which is understood to mean active sympathy or a willingness to bear the pain of others. In practice, prajna gives rise to karuna, and karuna gives rise to prajna. Truly, you can't have one without the other. They are a means to realizing enlightenment, and they are also enlighenment manifested.
Compassion as Training
In Buddhism, the ideal of practice is to selflessly act to alleviate suffering wherever it appears. You may argue it is impossible to elminate suffering, and maybe it is, yet we're to respond anyway.
What does being nice to others have to do with enlightenment? For one thing, it helps us realize that "individual me" and "individual you" are mistaken ideas. And as long as we're stuck in the idea of "what's in it for me?" we are not yet wise.
In Being Upright: Zen and the Bodhisattva Precepts, Soto Zen teacher Reb Anderson wrote, "Reaching the limits of practice as a separate personal activity, we are ready to receive help from the compassionate realms beyond our discriminating awareness."
Reb Anderson continued, "We realize the intimate connection between the conventional truth and the ultimate truth through the practice of compassion. It is through compassion that we become thorougly grounded in the conventional truth and thus prepared to receive the ultimate truth. Compassion brings great warmth and kindness to both perspectives. It helps us to be flexible in our interpretation of the truth, and teaches us to give and receive help in practicing the precepts."
In The Essence of the Heart Sutra, His Holiness the Dalai Lama wrote,
"According to Buddhism, compassion is an aspiration, a state of mind, wanting others to be free from suffering. It's not passive -- it's not empathy alone -- but rather an empathetic altruism that actively strives to free others from suffering. Genuine compassion must have both wisdom and lovingkindness. That is to say, one must understand the nature of the suffering from which we wish to free others (this is wisdom), and one must experience deep intimacy and empathy with other sentient beings (this is lovingkindness)."