Here's some picture about spina bifida, a potentially tragic failure of developing lower end of spine with spinal cord inside to become separate from the skin. You can get some ideas of the layers forming. There are so many such events it is a marvel that congenital anomalies are not far commoner than they are.