Panchagni vidyā (Sanskrit: पञ्चाग्नि) means - meditation on the five fires. This vidyā or knowledge appears in the Chandogya Upanishad (Chapter V 3-10) and the Brihadaranyaka Upanishad (Chapter VI.2). It is one of the forty-one prescribed Vedic rituals.

In Panchagni vidyā, which vidyā is a specific kind of knowledge, the symbolic agni (fire) is the object of meditation and has five important aspects – the three worlds (the heaven, earth and intermediate space), man and woman; which vidyā is taught in connection with the "Doctrine of Transmigration of souls" as the "Doctrine of descent". This vidya was taught by the royal sage, Prāvāhana Jaivali, to Svetaketu, son of Uddālka Āruni.  Panchagni vidyā belonged to the Kśatriyas. Uddālaka Āruni was the first Brahmin to receive this knowledge.

Pravāhana Jaivali, who was well-versed in udgitha, held that the Universe exhibits at every stage the principle of sacrifice in as much as the heaven by itself is a great altar in which the sun is burning as fuel from the oblation that is offered in this sacrifice, namely shraddhā, rises the Moon; looking at the sky again it is seen that parjanya is the great altar in which the year is burning as fuel from the oblation offered in this sacrifice, namely the Moon, rises Rain; then again the whole world is a great altar in which the earth burns as fuel from the oblation offered in this sacrifice, namely Rain, rises Food; man himself is a great altar in which the opened mouth is the fuel from the oblation offered in his sacrifice, namely Food, rises Seed; and finally woman herself is a great altar in which Seed being offered as an oblation, rises Man. This is his celebrated "Doctrine of the Five Fires".

The Panchagni Vidya or the Knowledge of the 5 fires explains how the body is linked to the universe and why the mind’s true nature is to manifest its will in the universe. The Five Fires, called the Panchagnis, are not physical fires but meditation techniques. The Fire, here, is symbolic of a sacrifice which one performs through contemplation. 

The Chandogya Upanishad, which belongs to the Kauthuma Śākhā of the Sāma Veda, conceives the whole universal activity of creation as a kind of yajna ('sacrifice') where everything is connected; this sacrifice/knowledge is known as the Panchagni vidyā. The activity of creation (or of manifestation of any object) begins with the birth of the child (or with the production of an atom or molecule) whom the cosmos produces and not parents alone, then the child’s presence is felt everywhere mainly because the universe is intimately inter-connected. The Śāstras teach that the macrocosm is in the microcosm; each manifestation is the quintessence of every particle of Prakrti, and that Prakrti on its own accord takes care of each manifestation or birth and withdraws those manifestations as a part of the operation of the universal laws. This is the philosophical background of this vidyā which deals all events of manifestation not merely as the birth of a human child alone, and which vidyā is the contemplation of the mind in perceiving the reality that is transcendent to the visible parts of the inner sacrifice. The subtle effects (all effects are only phenomenal) produced by all our actions are invisible to the eye, they are called apurva; we, as the causers of apurva, reap the fruits of all our actions; because higher realms are activated by our actions, with every stage of development being a sacrifice i.e. a meditation, the consequence of those actions become the cause of our descent.

Swāhānanda in his commentary on Sloka IX.80 of Panchadasi explains that knowledge once arisen cannot be prevented but meditation depends on the will of the meditator; and with regard to the conceptions for meditation (vijñāña), Badarayana clarifies:-

सर्ववेदान्तप्रत्ययं चोदनाद्यविशेषात् ||

"Any (particular) conception (for meditation) imparted in all the Upanishads is the same on account of the sameness of the injunction etc." (Brahma Sutras III.iii.1)

Shankara in his commentary on this sutra explains that the sameness persists even when a difference of forms is in evidence, for instance, in some recensions the Upanishads speak about  a sixth and entirely different fire in the context of the meditation on the five fires, whereas others have only five. He states that the materials and the deities determine the form or nature of the sacrifice, so also is to be known about the form of meditation determined by the object meditated on;  for vijñāña is stamped according to the principle meditated on.

References

Vedanta
Sanskrit words and phrases