Hiccups happen because of involuntary spasms or contractions of the diaphragm, a muscle located just below the lungs that plays a key role in breathing. When the diaphragm spasms, it causes a sudden intake of breath that is quickly stopped by the closing of the vocal cords, producing the "hic" sound characteristic of hiccups. This spasm can be triggered by irritation or stimulation of the nerves that control the diaphragm, including the vagus and phrenic nerves.
Common causes of hiccups include eating too much or too quickly, drinking carbonated beverages or alcohol, sudden excitement or stress, swallowing air, or experiencing sudden temperature changes. Some medical conditions or nerve irritations can cause persistent or long-lasting hiccups, but brief hiccups are usually harmless and resolve on their own.
In summary, hiccups occur due to a reflex arc involving the diaphragm muscle and its nerve supply being irritated, causing spasms that lead to the distinctive hiccup sound.