“Anyone whose mind operates on the level of clear knowledge will abandon selfish motives. She will then works only as a sacrifice. Thus all her karmas (actions and reactions) dissolve and she becomes enlightened.” [4.23]
“Sacrifice” means work done to benefit others, not oneself. In the highest sense, this means working to satisfy the divine. Thus the Sanskrit word for sacrifice (Yajña) is also a name for the Divine Godhead, Viṣṇu.
The person who initiates a deed is the primary party held responsible for it. The mastermind of a crime, for example, is the primary target of punishment, even if he or she did not personally carry out the deed. This is a mirror of the universe’s own system of justice – karma. When I work to fulfill my own selfish plans, I will enjoy or suffer the just rewards. But when I work as a sacrifice for the sake of others, I receive little or no material reward or punishment, and thus become liberated from the cycle of karma.
Thus “sacrificial work” is spiritual. But Arjuna doubts that it is possible for work (which appears to be worldly and material) to have spiritual rewards. So Krishna says:
“In a sacrifice, everything is spiritual: the implements are spiritual, the oil is spiritual, the fire is spiritual, the priest is spiritual, and the offerings are spiritual. So, one who is completely absorbed in spiritual activities certainly attains spiritual results.” 
This is the literal way to perform sacrifice. But now Krishna will explain that there are many ways to perform “sacrifice” besides the literal method:
“Some yogis perform sacrifice by carefully worshipping the gods. Others sacrifice sacrifice itself into the fire of spirit. 
“Some sacrifice sense perception into the fire of restrictions. Others sacrifice the sense objects into the fires of the senses. 
“Others sacrifice everything – the deeds of the senses and even the deeds of their breath – into the fire of self-control, illuminated by knowledge. 
“Some perform sacrifice with their wealth, others with their austerities, others by practice of aṣṭānga yoga, and still others by studying philosophy – all of them under strict vows. 
“Some resort to the sacrifice of breath-control, offering their exhalations into their inhalations and visa versa, thus arresting their breath. Others stop eating and offer their exhalation into itself.” 
In this elaborate section, Krishna mainly makes the point that there are many ways to perform “sacrifice” – one need not always literally have an altar, a priest, etc.
He mentions the sacrifices of:
- worshipping gods
- giving up everything altogether
- limiting the senses
- employing the senses
- limiting the breath – even to the point of halting it.
He says that all sacrifices involve following vows. Some sacrifices (1 and 4, above) are done by giving up objects, others (3) by taking pains, others (5) by following regimens like aṣṭānga yoga, and others (2) by cultivating knowledge.
“All of them understand ‘sacrifice.’ So all of them are purified by sacrifice, enjoy the immortal nectar resulting from sacrifice, and attain the eternal spirit. But, my friend, those who don’t understand sacrifice gain nothing in this world or the next.” [30-31]
“These many varieties of sacrifice come from the Vedas, which are like the ‘voice of spirit.’ If understand that all of them involve work, you will be emancipated.” 
The original point which inspired Krishna to speak this section of the Gītā was Arjuna’s doubt: “How can work, a material thing, have a positive spiritual effect?” Krishna elaborated on many different types of spiritual activities and made the point that all of them involve effort, work and all have a spiritual result.