Many of your muscles are afflicted at times by spasms or tics, and your diaphragm is no exception. When your diaphragm spasms, you involuntarily inhale and then exhale, shallowly and quickly. This is known as a hiccup (also spelled hiccough. You get rid of diaphragm spasms in the same way as you get rid of other muscle spasms - you calm down the muscle by holding it in one position for a long time. Slowly drinking a cup of water works because you automatically stop breathing while you're using your throat for something else. The method that works best for me is simply taking as deep a breath as possible and holding it for as long as I can.