A diaphragmatic hernia occurs when the muscle that separates the chest from the abdomen fails to close during fetal development, and contents from the stomach, intestines and/or other abdominal organs move into the chest through the opening.