Hiccups, technically known as a singletus, are a closure of the vocal cords caused by a sudden influx of air when the diaphragm suffers a myoclonic jerk. Hiccups are completely involuntary and are caused by an uncontrolled reflex action.
Hiccups are generally self-resolving, although most people attempt a "home remedy" in order to shorten their duration. Their underlying cause is poorly understood, but risk factors that lead to hiccups are overeating, rapid eating, soda, alcohol, spicy food, opiates, benzodiazepine, and tobacco. Some diseases can cause hiccups as a symptom, including diabetes mellitus, multiple sclerosis, meningitis, and acid reflux.
As for immediate relief, drinking water or increasing the level of carbon dioxide (by breathing into a bag) is often effective.