By blocking COX enzymes, ibuprofen reduces the levels of prostaglandins, leading to decreased inflammation and pain relief.
To protect your stomach, you could consider a COX-2 inhibitor like Celebrex because it blocks inflammation while keeping intact the prostaglandins that protect your stomach and intestines.