Gastrulation

Gastrulation is a phase early in the development of most animal embryos. In it, the embryo is dramatically restructured by cell migration.
Gastrulation varies in different phyla. It is followed by "organogenesis", when individual organs develop within the newly formed "germ layers".
The gastrula is the double-walled stage of the embryo. During gastrulation, some of the cells of the blastula migrate inwards to make an inner layer, the "endoderm". In some animals another cell layer forms, the "mesoderm", between the endoderm and the "ectoderm".
Germ layers.
Among animals, sponges show the simplest organization, having a single germ layer. Cnidaria and ctenophores show an increase in complexity, having two germ layers, the "endoderm" and "ectoderm". All higher animals (from flatworms to humans) possess a "mesoderm" as well as ectoderm and endoderm.
Development of germ layers.
The purpose of gastrulation is to position the 3 embryonic germ layers, the endoderm, ectoderm and mesoderm. These layers later develop into certain bodily systems.