Om KarmanyeVad Karaste
Maha Phaleshu Kadachina
Maha Karmaphala Hetur Bhuv
Matesango a Karmani
You only have the right to action but not the result of your action. Just like a farmer has control over sowing the seeds but the harvest depends on external factors not in control of the farmer.
Our actions are a product of our past Karmas. Unsuspectingly we are driven to action by past Karmas. We think we have free will, but there is no such thing. The point to be clarified here is that stopping all action to not acquire further karma is foolishness. The law of Karma will not allow you to sit idle. You just cannot renounce action unless it is your destiny to be a renunciate. All others have to continue on the path of action executing their duties . Now the question is, what is or duty? Duty is a very weak word. In Hindu scriptures it is also termed as DHARMA. But Dharma has many meanings and it is subtle. Dharma cannot be explained, it just is. A person who abides by the principles of being good and doing good is following Dharma. But the being good and doing good has to come naturally. For example the Dharma of grass is to be green. Dharma is whatever is natural and whatever is pure arising from the soul. For a Warrior Dharma is to protect and take care of people at all cost, even if it means giving up ones life for that sake. The duty of a husband is to take care of his wife, his children his parents and the community. Again these are examples and they are not accurate. Dharma has to be experienced.
Now coming back to doing action without expectations of results. Under all circumstances one should remember that nature is greater than all and all that we have and will ever have is coming from nature. Hence it is ones duty to not think of the reward of ones action. Give a poor person a little money but dont stand on a pedestal and proclaim that you did and show off. Such show off is not going to result in good Karma.
Finally all these things that have been written are to be experienced. Unless you are ready you wont understand the meaning of the things I have mentioned above. So, dont get disheartened if you dont get it. You might experience the same things in a different way that you have not even imagined. This is how nature functions.