Technically it’s a contraction of the diaphragm that you can’t control. It seems to be linked with ingesting a lot of air (say you eat very fast) and it’s a way of the body to get rid of the air in the stomach. It’s very annoying but useful!
thanks for this brilliant question
A hiccup, medically known as SDF (synchronous diaphragmatic flutter) or singultus, is a sudden, involuntary contraction of the diaphragm which occurs at the same time as a contraction of the voice box (larynx) and total closure of the glottis, effectively blocking air intake. The glottis is the middle part of the larynx, where the vocal cords are located.