My belly has been bloating out feeling sick now and again and having bad headaches what could it be?

Perhaps a mild case. of gastroenteritis. Consider starting w clear liquid like water, slightly flattened soda that is clear, or sports hydration drinks. Sip, sip, sip. Work up to solids w bland foods like bananas, rice, applesauce, toast, gelatin, or chicken. Avoid alcohol, nicotine, caffeine, dairy & high fat foods. Rest.
Virus? Possible you contracted a virus affecting your stomach and causing headaches. Tough to say, without an exam, so see the dr to get properly diagnosed and treated if it persists.