Transformation of the blastula into the gastrula with three primary germ layers by rearrangement of the cells is called gastrulation (G.gaster= belly).
The three germ layers are ectoderm, mesoderm, and endoderm. They serve as the initial rudiments of all the future tissues and organs and organ systems of the young one to be developed.
Gastrulation occurs during the second week. Cell covering the free surface of the embryonal knob flatten and form endoderm.
The embryonal knob stretches into an embryonic disc composed of a single layer of cells, the epiblast (ectoderm+mesoderm).
Cells proliferate at the hind end of the epiblast, detach from it, and spread between the endoderm and epiblast.
The latter now forms ectoderm as mesoderm has separated from it.
It consists of the endoderm (inner layer), the ectoderm (outer layer), and the mesoderm (middle layer).
Ectoderm - It is the outermost layer that forms nails, hair, spider, etc.
Endoderm - It is the innermost layer that forms the stomach, colon, urinary bladder, etc.
Mesoderm - It is the middle layer between ectoderm and endoderm which forms bones, cartilage, etc.