Why do we get hiccups?
A misfiring nerve jerks your diaphragm down, then your voice box snaps shut, hic.
A hiccup is two muscles, badly timed
A single hiccup is really two events stacked a quarter-second apart. First the diaphragm, the dome of muscle under your lungs, contracts sharply and out of turn, yanking air inward. Then, almost immediately, the flap guarding your windpipe slams shut and chops that breath off.
The sound itself is air hitting the suddenly-closed glottis. No air actually reaches your lungs, the whole inhale is cancelled the instant it begins.
Why the nerve misfires
The diaphragm answers to the phrenic and vagus nerves, which run a long, exposed route from the brainstem down through the chest. Stretch, irritate, or chill anything along that path and the reflex can trip.
An ancient reflex with no clear job
Hiccups appear in the womb before lungs are ever used for breathing, which hints they are very old. One leading idea traces the reflex to amphibian ancestors: the same gulp-and-close motion that pushes water across gills survives in us as a leftover circuit.
Most bouts are harmless and fade within minutes as the nerves settle. The folk remedies, holding your breath, sipping cold water, mostly work by raising carbon dioxide or stimulating the vagus nerve enough to reset the loop.