A hiatal hernia occurs when a portion of the stomach pushes up through the diaphragm into the chest cavity. The diaphragm normally has a small opening (hiatus) through which the esophagus passes on its way to connect to the stomach. When a hiatal hernia happens, the stomach can move up through this opening.