Your body has something called a diaphragm. It is a thin sheet of muscles located under your lungs. When it pulls down toward the ground, if forces your lungs to fill with air, because it creates an empty space. You then breathe out eventually and it goes back up. Well, this thin muscle can also cause hiccups when it does not move smoothly, but has a jerking motion. This cause you to gasp air and make the "hiccup" sound.
Nobody really know what causes them, but unless you have them for like 2 days straight or something, it is nothing to worry about. It may be caused by a nerve that is tickling the muscles for some reason. There are all sorts of home remedies. The most common is to slowly keep sipping small amounts of water until they stop. Other people say a spoon of sugar in your mouth does the trick. Peanut butter for others. You can try pulling your tongue out with your fingers. It helps stimulate the nerve that is causing the problem and might help. Another one that is supposed to really work is to plug both of your ears (use your fingers) and drink a large glass until the last drop of water with a straw.
Let us know if any of these work for you