In this world nothing happens to a person that he does not for some reason or other deserve. Usually, men of ordinary intellect cannot comprehend the actual reason or reasons. The definite invisible cause or causes of the visible effect is not necessarily confined to the present life, they may be traced to a proximate or remote past birth.
According to Buddhism, this inequality is due not only to heredity, environment, "nature and nurture", but also to Karma. In other words, it is the result of our own past actions and our own present doings. We ourselves are responsible for our own happiness and misery. We create our own Heaven. We create our own Hell. We are the architects of our own fate.
There are five orders to the mental and physical world. The third is Karma Niyama - the order of act and result, e.g., desirable and undesirable acts produce corresponding good and bad results. As surely as water seeks its own level so does Karma, given opportunity, produce its inevitable result, not in the form of a reward or punishment but as an innate sequence. This sequence of deed and effect is as natural and necessary as the way of the sun and the moon.
In other words, do good for the world and receive good from the world. Do bad for the world and have pervasive hangnails.