During gastrulation, cells of the blastula rearrange to form a three-layered structure known as the gastrula. This process involves the migration of cells inward to form the endoderm. The cells that migrate inward through the primitive streak differentiate into endodermal cells.