A hiccup is an involuntary action involving a reflex arc over which we have no control. Hiccups are caused by a spasm in the diaphragm.The diaphragm is the muscle that separates the chest from the abdomen and has a key function in breathing.
The diaphragm almost always works perfectly. When you inhale, it pulls down to help pull air into the lungs. When you exhale, the diaphragm relaxes and air flows out of the lungs back out through the nose and mouth. But sometimes the diaphragm becomes irritated. When this happens, it pulls down in a jerky way, which makes you suck air into your throat suddenly. The sudden rush of air into the lungs causes the epiglottis to close, creating that hic sound.