In the beginning before the creation only Sat or Brahman or Purusha existed. Because it willed to become many, it caused the creation of Prakriti.
Prakriti initially started from total non-expression. Therfore it is called avyakta. The word Prakriti is derived from sanskrit root "dukrin-karane" meaning prakrishtena kriyate. It signifies the forward progression.
From it emerged Mahat. Mahat is vast ocean of matrix of consciousness enveloping entire Universe. From mahat developed the Ahamkar.
Ahamkar is the identities of one self. All biomolecules possess the property of self assembly. In biological terms it is self assembly, organization, of a cell and its duplication, multiplication, self replication, and finally the perpetuation of itself.
Our body immunity is based on this capacity of cells to identify and reject, kill, and destroy any foreign invaders as in case of various infections. The T-cells have the capacity to generate memory of invaders and produce antibodies against them.
(other meaning of Ahamkar is ego) It acts through three Primal qualities viz. Sattva, Rajas and Tamas.