During gastrulation, the three germ layers of embryos (endoderm, ectoderm, and mesoderm) develop, which will give rise into the different organ systems of the unborn child. Each one will from different tissues.
Out of the ectoderm, the external layer of the embryo, the nervous system and the skin form. On the other hand, the mesoderm will develop into the muscle, skeleton, kidneys, and the reproductive system, amongst other organs. The endocrine glands, lungs, digestive tract, liver, etc. all originate from the endoderm.