Pain is the symptom usually arising from certain diseases. It is difficult to say what be the cause of your pain without any proper clinical examination and investigations.
Common causes of abdominal pain are appendicitis (inflammation of the appendix), bowel obstruction, inflammation of the gallbladder, chronic constipation, dissecting abdominal aortic aneurysm, diverticular disease, early-stage shingles (a viral infection where pain begins before the appearance of a rash), excessive gas, food allergy, food poisoning, gastro esophageal reflux, heartburn or indigestion, hernia, Infectious mononucleosis, inflammatory bowel disease, irritable bowel syndrome, kidney stones, lactose intolerance, pancreatitis (inflammation of the pancreas), parasitic infections (giardia), sickle cell crisis, spinal fracture, ulcers, urinary tract infections, viral gastroenteritis (stomach flu), etc.
Some suggestions for mild pains: Sip water or other clear fluids. Avoid solid food for the first few hours. If you have been vomiting, wait 6 hours. Then eat small amounts of mild foods such as rice, or crackers. If the pain is high up in your abdomen and occurs after meals, antacids may provide some relief, especially if you feel heartburn or indigestion. Avoid citrus, high-fat foods, fried or greasy foods, tomato products, caffeine, alcohol, and carbonated beverages. AVOID aspirin, ibuprofen or other anti-inflammatory medications, and narcotic pain medications unless your health care provider prescribes them.
For prevention of many types of abdominal pain: Eat small meals more frequently. Make sure that your meals are well-balanced and high in fiber. Eat plenty of fruits and vegetables. Limit foods that produce gas. Drink plenty of water each day. Exercise regularly. Have stress free life style.
For prevention of symptoms from heartburn or gastro esophageal reflux disease: Quit smoking. Lose weight if you need to. Finish eating at least 2 hours before you go to bed. After eating, stay upright for at least 30 minutes. Elevate the head of your bed.