Briefly told, a yajna is making an oblation to a deity in the fire with the chanting of mantras. In a sense the mantras themselves constitute the form of the deities invoked. In another sense, the mantras, like the materials placed in the fire, are the sustanence of the celestials invoked. They enhance their powers and serve more than one purpose. We pay taxes to the government. However, the various imposts - professional tax, land tax, motor vehicles tax, and so on - are collected by different offices. There are also different stamp papers for the same. Similarly, for each karma or religious work there is an individual deity, a separate mantra, a particular material, etc, but the ultimate goal of all these is dedication to the Supreme God. We know that different departments are meant for the same government. Similarly, we must realise that the sacrifices performed for the various deities have behind them one goal, the Paramatman.
The king or president is not personally acquainted with us who pay the taxes. But Paramesvara, the Supreme Monarch, knows each one of us better than we know ourselves. He also knows whether we pay the taxes properly, the taxes called sacrifices. Paramesvara cannot be decieved.
As mentioned before, for each sacrifice there are three essential requirements: the mantra, the material for oblation, and the deity to be invoked, the three bringing together speech, hand [body] and mind.
For a general background, please see here