karmaṇy-evādhikāras te mā phaleṣhu kadāchanaYou have a right to perform your prescribed duties, but you are not entitled to the fruits of your actions. Never consider yourself to be the cause of the results of your activities, nor be attached to inaction.
mā karma-phala-hetur bhūr mā te saṅgo ’stvakarmaṇi
This is an extremely popular verse of the Bhagavad Gita, so much so that even most school children in India are familiar with it. It offers deep insight into the proper spirit of work and is often quoted whenever the topic of karma yoga is discussed. The verse gives four instructions regarding the science of work: 1) Do your duty, but do not concern yourself with the results. 2) The fruits of your actions are not for your enjoyment. 3) Even while working, give up the pride of doership. 4) Do not be attached to inaction.
Do your duty, but do not concern yourself with the results. We have the right to do our duty, but the results are not dependent only upon our efforts. A number of factors come into play in determining the results—our efforts, destiny (our past karmas), the will of God, the efforts of others, the cumulative karmas of the people involved, the place and situation (a matter of luck), etc. Now if we become anxious for results, we will experience anxiety whenever they are not according to our expectations. So Shree Krishna advises Arjun to give up concern for the results and instead focus solely on doing a good job. The fact is that when we are unconcerned about the results, we are able to focus entirely on our efforts, and the result is even better than before.
A humorous acronym for this is NATO or Not Attached to Outcome. Consider its application to a simple everyday activity such as playing golf. When people play golf, they are engrossed in the fruits—whether their score is under par, over par, etc. Now if they could merely focus on playing the shots to the best of their ability, they would find it the most enjoyable game of golf they have ever played. Additionally, with their complete focus on the shot being played, their game would be raised to a higher level.
The fruits of your actions are not for your enjoyment. To perform actions is an integral part of human nature. Having come into this world, we all have various duties determined by our family situation, social position, occupation, etc. While performing these actions, we must remember that we are not the enjoyers of the results—the results are meant for the pleasure of God.