Aspirin and other non-steroidal anti-inflammatory drugs (NSAIDs) like ibuprofen and indomethacin work by inhibiting prostaglandin H2 synthase that produces prostaglandins???hormone-like messenger molecules that trigger many processes in the body, including inflammation.