http://www.thebigview.com/buddhism/QUOTE
What is karma?
Karma is a Sanskrit word that literally means "action". The word is used to refer to volitional acts as well as the forces that arise from these acts. The idea of karma had existed in ancient Indian philosophy before the time of Siddhartha Gautama, and it became an important element of Buddhist philosophy.
The Hindu and Buddhist concepts of karma are quite similar, although Hinduism makes a further distinction between different types of karma, such as present karma, latent karma, and future karma. In the understanding of both thought systems, the law of karma describes the connection between actions and the resulting forces, as follows: wholesome actions lead to wholesome states while unwholesome actions lead to unwholesome states, individually as well as collectively.
Is there really a connection between actions and resulting forces? Stalin was responsible for the deaths of millions and yet died in his bed. It seems that the unwholesome actions of a minority are most often turned into unwholesome states for the poor masses below them. Bad things often happen to good people.
What is the moral mechanism (if any) at work here?