kaaryamityeva yatkarma niyatam kriyaterjuna |
sangam tyaktvaa phalam chaiva sa tyaagaha saattviko mataha || 9 ||

Whatever action is done, should be performed only as an obligatory duty. In this manner, giving up attachment and also the reward, that giving up is saattvic, in my opinion.
kaaryam : action
iti : in this manner
eva : only
yat : whatever
karma : actions
niyatam : obligatory
kriyate : is performed
arjuna : O Arjuna
sangam : attachment
tyaktvaa : giving up
phalam : reward
cha : and
eva : also
saha : that
tyaagaha : giving up
saattvikaha : saattvic
mataha : opinion
Shri Krishna explains the correct way, the saattvic method, of performing actions. Let us look at this step by step. The first step is to only perform actions that are within the realm of our state in life, our aashrama, and our career, our varna. Actions that are prohibited or actions that are purely out of selfishness should not be performed. These actions are termed as niyatam karma in the shloka. A high degree of awareness is required to first ensure that we are not stepping into any prohibited actions.
The second step is to give up attachment to the reward, the phala, the fruit, of the action. Attachment to the reward need not be something tangible and physical. It could be subtle things like praise and adoration received from others on successful completion of the action. It could be a subtle thought such as “I have helped that person, so nice of me to do so”. The goal is to slowly wean the mind away from its natural tendency to expect rewards for every action. We can do so my substituting our personal motive with a motive for selfless service.
The third step is to give up attachment to the action itself. We saw the types of attachment to action in the previous shloka, including attachment to the completion of action and attachment to one particular way of performing the action. The key is to realize that at every moment, we are giving it the best of our ability and attention. The rest is upto Ishvara, since there are several other factors at play in the outcome of an action. But in no circumstance should our energy level go down. We have to combine energy in our work with indifference to the reward of the work.