We get hiccups because of involuntary spasms or contractions of the diaphragm, the muscle just below the lungs that helps with breathing. These spasms cause a sudden closing of the vocal cords, which produces the characteristic "hic" sound. The diaphragm spasms can be triggered by various factors such as eating or drinking too quickly, swallowing air, drinking carbonated beverages or alcohol, emotional stress, sudden temperature changes, and irritation of the nerves controlling the diaphragm (vagus nerve or phrenic nerve). Sometimes, hiccups can also be caused by underlying medical issues affecting the nerves, central nervous system, metabolism, or certain medications.