Dogs get hiccups just like we do, from swallowing too much air. The diaphram contract, taking air into the lungs and shutting off the epiglottis. Puppies are especially prone to them. They usually go away by themselves.
Make sure that your dog has access to plenty of water. The same way that water can calm down our hiccups, they can calm down your dog's as well.
Play with your dog or take your dog for a run. The change in his breathing patterns may help the hiccups go away. Feeding your dog can also change his breathing patterns, so you can try to give him a little snack.
If your dog gets hiccups frequently, try changing their food. Lower quality food can aggravate them.