Purusha (Sanskrit puruṣa पुरुष) is a complex concept whose meaning evolved in Vedic and Upanishadic times. Depending on source and historical timeline, it means the cosmic being or self, consciousness, and universal principle.
In the Upanishads, the Purusha concept refers to abstract essence of the Self, Spirit and the Universal Principle that is eternal, indestructible, without form and is all pervasive. The Purusha concept is explained with the concept of Prakrti in the Upanishads. The Universe is envisioned in these ancient Sanskrit texts as a combination of the perceivable material reality and non-perceivable, non-material laws and principles of nature. Material reality (or Prakrti) is everything that has changed, can change and is subject to cause and effect. Purusha is the Universal principle that is unchanging, uncaused but is present everywhere and the reason why Prakrti changes, transforms and transcends all of the time and which is why there is cause and effect. Purusha is what connects everything and everyone according to the various schools of Hinduism.
Purusha is a complex concept, whose meaning has diversified over time in the philosophical traditions now called as Hinduism. During the Vedic period, Purusha concept was one of several theories offered for the creation of universe.[a] Purusa, in Rigveda, was described as a being, who becomes a sacrificial victim of gods, and whose sacrifice creates all life forms including human beings.
In the Upanishads and later texts of Hindu philosophy, the Purusha concept moved away from the Vedic definition of Purusha and was no longer a person, cosmic man or entity. Instead, the concept flowered into a more complex abstraction.
Splendid and without a bodily form is this Purusha, without and within, unborn, without life breath and without mind, higher than the supreme element. From him are born life breath and mind. He is the soul of all beings.
Both Samkhya[b] and Yoga schools of Hinduism state that there are two ultimate realities whose interaction accounts for all experiences and universe - Prakrti (matter) and Purusha (spirit). In other words, the universe is envisioned as a combination of perceivable material reality and non-perceivable, non-material laws and principles of nature. Material reality, or Prakrti, is everything that has changed, can change and is subject to cause and effect. Universal principle, or Purusha, is that which is unchanging (aksara) and is uncaused. The animating causes, fields and principles of nature is Purusha in Hindu philosophy. Hinduism refers to Purusha as the soul of the universe, the universal spirit present everywhere, in everything and everyone, all the times. Purusha is Universal Principle that is eternal, indestructible, without form and all pervasive. It is Purusha in the form of nature’s laws and principles that operate in the background to regulate, guide and direct change, evolution, cause and effect. It is Purusha, in Hindu concept of existence, that breathes life into matter, is the source of all consciousness, one that creates oneness in all life forms, in all of humanity, and the essence of Self. It is Purusha, according to Hinduism, why the universe operates, is dynamic and evolves, as against being static.
Both Samkhya and Yoga school holds that the path to moksha (release, Self-realization) includes the realization of Purusha.
RigVeda Informed "पुरुष एवेदं सर्वं यद भूतं यच्च भव्यम|" "This Puruṣa is all that yet hath been and all that is to be". 
The abstract idea Purusha is extensively discussed in various Upanishads, and referred interchangeably as Paramatman and Brahman (not to be confused with Brahmin). Sutra literature refers to a similar concept using the word puṃs.
Rishi Angiras of the Atmopanishad belonging to the Atharvaveda explains that Purusha, the dweller in the body, is three-fold: the Bahyatman (the Outer-Atman) which is born and dies; the Antaratman (the Inner-Atman) which comprehends the whole range of material phenomena, gross and subtle, with which the Jiva concerns himself, and the Paramatman which is all-pervading, unthinkable, indescribable, is without action and has no Samskaras.
There is no consensus among schools of Hinduism on the definition of Purusha, and it is left to each school and individual to reach their own conclusions. For example, one of many theistic traditions script such as Kapilasurisamvada, credited to another ancient Hindu philosopher named Kapila, first describes purusha in a manner similar to Samkhya-Yoga schools above, but then proceeds to describe buddhi (intellect) as second purusha, and ahamkara (ego) as third purusha. Such pluralism and diversity of thought within Hinduism implies that the term purusha is a complex term with diverse meanings.
In one verse of Rigveda, Varna is portrayed as a result of human beings created from different parts of the body of the divinity Purusha. This Purusha Sukta verse is controversial and is believed by many scholars, such as Max Müller, to be a corruption and medieval or modern era insertion into Veda, because unlike all other major concepts in the Vedas including those of Purusha, the four varnas are never mentioned anywhere else in any of the Vedas, and because this verse is missing in some manuscript prints found in different parts of India.
That remarkable hymn (the Purusha Sukta) is in language, metre, and style, very different from the rest of the prayers with which it is associated. It has a decidedly more modern tone, and must have been composed after the Sanskrit language had been refined.
There can be little doubt, for instance, that the 90th hymn of the 10th book (Purusha Sukta) is modern both in its character and in its diction. (...) It mentions the three seasons in the order of the Vasanta, spring; Grishma, summer; and Sarad, autumn; it contains the only passage in the Rigveda where the four castes are enumerated. The evidence of language for the modern date of this composition is equally strong. Grishma, for instance, the name for the hot season, does not occur in any other hymn of the Rigveda; and Vasanta also does not belong to the earliest vocabulary of the Vedic poets.
The Purusha Sukta is a later interpolation in the Rig Veda. (...) Verses in the form of questions about the division of Purusha and the origins of the Varnas are a fraudulent emendation of the original.