Hiccups are involuntary actions caused by the combined action of the diaphragm and the epiglottis.
The diaphragm is a large sheet of muscle that separates the chest from the abdomen. It can tighten or relax automatically to draw in or push out air during breathing. The epiglottis is a tiny flap of tissue which can flip or flop to cover either our air passage or food passage during swallowing and breathing respectively. Special signals from our nerves control these automatic actions of the diaphragm and the epiglottis. However, sometimes these signals get mixed up, thus causing a sudden tightening of the diaphragm and a big gush of air being drawn in.