In the development of a fetus, the original fertilized egg cell divides; each of those cells divide until the embryo reaches a stage where it is a hollow ball of cells--the blastula. An indentation forms in one end; pushing your thumbs into a balloon helps visualize this process, called gastrulation. At this point the cells of the embryo begin to differentiate (specialize).
If we keep the balloon analogy, the cells that are still on the outside are what is called the exoderm. It becomes the skin, parts of the nervous system including the brain, the cornea of the eye, and mammary glands.
The indentation around your thumbs, which eventually extends to create a tube all the way through, is referred to as the endoderm. It becomes the lining of the digestive tract, and organs including the stomach, liver, pancreas, and intestines as well as parts of the respiratory system such as the lungs. It also forms part of the urinary system and the thyroid gland.
The layer in between the exoderm and endoderm is the mesoderm. It becomes the circulatory system (including the heart), the muscles, the bones, the lymphatic system, and parts of the reproductive system.
The information I've given you applies to mammals, including humans (as well as other types of animals). See the second link below for information about other types of development.