"Fruits of any work - labour or rites, will reach only those who offer without hatred or jealousy"
Here is a small story to explain the concept.
Once upon a time, there was an old man named Narayana. Narayana had four sons - Bharatha, Lakshmeesha, Rudra and Gauthama. Each of these sons were married with children and lived in separate houses, but were close to their old father's house. One day, the old man lay in his deathbed, with all his sons and their wives and children around him. The old man spake thus - "My sons, I have always wanted to perform the sacred Yagna that does good to our entire family tree. But I never had the money. I don't have any time left. Soon I will pass to the other world. But please promise me that you will do this Yagna". The sons promised the old man, who soon departed on his journey to the other world.
Now the sons were in a dilemma, for the Yagna that their father wanted to perform was one that cost a lot of money. Who would put in the money became a question in each of their minds, but none spoke about it. Nobody took any steps towards the Yagna. Finally, the youngest son Gauthama decided to take it upon himself. And thus he began preparations for the great Yagna - from inviting several guests, to arranging for the sacred twigs, finding out auspicious days and getting the sages... He took care of it all. One evening, Gauthama's wife Deepa was talking to her sister who asked her who would sit at the sacred fire, for, according to the scriptures, the eldest person of the family had to sit, and that would mean that the eldest brother Bharatha had to be there. However, since it was Gauthama who had organised and paid, it would be morally right for him to sit at the Yagna. The truth was that the majority of the fruits of the great Yagna goes to the person who sits at the helm of the affair, and next is followed by members of his immediate family which includes siblings, etc. The rest of the fruits get divided by everyone who attends the Yagna, and thus it is said to be auspicious to attend Yagnas.
Listening to this, Deepa immediately retorted saying that her husband alone had to sit, for nobody else had taken initiative, nor put in any money towards the entire affair. Why then, would they sit at the helm? They have no rights to sit there. After doing all the work and shelling out all the money, why should they get the fruits of our hard labour? Saying thus, she went fuming to her house, angry that her sister even had such a thought. And then arrived the auspicious day. Over a hundred people arrived at the site, where all the sacrificial rites were performed. The Yagna went on smoothly.
After a month, good things started happening to everyone in the family. Bharatha's daughter's marriage was fixed with a person from a very good family who was also very rich and good looking. Lakshmeesha's business started doing really well. Rudra's farm had a bumper crop. Deepa's sister's husband found a pot of gold while ploughing. And so on... Soon, Deepa found that most of the people who had attended the Yagna had good things happening to them, while nothing good seemed to be happening to her family. She got depressed and went to the wise Swami Gulagulaananda who was meditating at the top of the hill Dronagiri.
After listening to her question, the sage gave a soft smile and said - "My dear child. The Yagna by itself does great things, true. But in life, one good thing alone doesn't bring you good again. Everything is bound by Karma - Your actions and deeds. When you performed the Yagna, it is true that your husband deserved to sit at the helm. But in your mind, you had the thought that the fruits should come to you and you alone, and not to the others. You should remember that the Yagna was meant for the benefit of the family, and so the fruits HAD to go to all. One must think about oneself, but not at the expense of others. When you think thus, good doesn't happen to you. That is why we always chant - 'sarve janaaha suKhinoh Bhavantu' which means that all people should be happy. If you think bad of others, karma will ensure that you get the bad that you deserve. And fruits of your Karma get shared with him as well. And his with yours. Thus, be happy nothing bad happened to you. I do know that it sounds unfair."
Saying thus, he continued - "Karma is that which keeps the entire universe in balance. Even God comes below Karma. God is to ensure that Karma is maintained and may tweak it a bit here and there, for Karma is that which is independent of all systems and is self sustaining. Even the Gods come under Karma. Don't worry, my child. If you are good to others, Karma and Sri Krishna will ensure that you get what you deserve." Saying this, he again went back to meditation, while Deepa humbly bowed respectfully to the all knowing saint, gaining a very important pearl of wisdom.
You might also want to read