A hiatal hernia happens when a part of the stomach pushes through the hiatus, an opening in the diaphragm where the esophagus passes from the thorax to the abdomen.