What does it mean when your stomach is hard and it hurts to lay on it or slouch?

You need medical exa. Your belly should be checked by your doctor. It could be something serious. Anything that hurts to touch is something abnormal and must be checked out by a doctor.