The concept of karma, understood through the perspective of Buddhist thought, is, essentially, a system of cause and effect. Everything done, said, and thought has consequences. These consequences have consequences, and so on, creating an intricate web of inter-related inertia.
A common over-simplification of the matter is to say that 'bad' deeds are 'punished' and 'good' deeds are 'rewarded.' In some sense, this is true: a life filled with good deeds will be karmically 'beneficial' in that little negatively-based karma will accrue. The good karma that is created may very well result in an improvement of circumstance (in this life or the next).
But what is a reward, and what is a punishment? For the sake of this example, let us consider a man who has spent his entire lifetime in a state of mindful compassion. Many people have suffered less because this man has existed. As a consequence, he is reborn at a "higher" level of existence, a better life, sometimes refered (misleadingly) as that of a godlike being.
While such a situation might be pleasant, it is transient, finite, temporary, and an
illusion like every other perception. But while existing in such a fashion, a being would be very unlikely to perceive of him/herself as suffering (duhka) and would cling to the fabric of such an existence so strongly that samsara (the cycle of life, death and rebirth) would be an invisible, inescapable prison. Eventually, when it is too late, he/she will suffer from the realization that death is inevitable, that all the pleasure and good fortune will be lost, that transitory pleasures have no substance in the end, it is too late. The opportunity to follow the Eightfold Path is lost.
In the Buddhist perspective, the following of the Eightfold Path (right understanding, right thought, right speech, right action, right livelihood, right effort, right mindfulness, right concentration) is the only way to be free of samsara, the nature of which is duhka, and to enter a state of nirvana (enlightment during life), and eventually paranirvana (enlightened state after death). Therefore, karma, whether good or bad, is undesirable because it is the force that propels future lives.
A useful metaphor for understanding how karma works is to imagine the balls on a pool table. When one ball strikes another ball, the first stops while the second begins moving. Accordingly, when one life ends, the karma from that life creates the momentum for another life that must deal with the past karma while creating karma anew. There is no reincarnated soul, but rather it is the sum of a person's actions that is carried forward into the next life, resulting in an improvement or deterioration of the person's life circumstances.
Of course, according to Buddhism, the "Middle Path," the ideal rebirth is as a human in modest circumstances. Anything more and a being would be too distracted by pleasure to practice Buddhism; anything less and the ignorance and/or suffering would be insurmountable. By following the Eightfold Path (over one or many lifetimes), a human being can achieve perfect
balance, extinguishing previous karma while creating as little new karma as possible, eventually removing oneself entirely from the cycle of suffering.