OTC pain relievers work by reducing the production of chemicals in the body that cause inflammation and pain. For example, ibuprofen and aspirin are nonsteroidal anti-inflammatory drugs (NSAIDs), which inhibit the enzyme cyclooxygenase (COX) that is involved in the production of prostaglandins, chemicals that promote inflammation. Acetaminophen works differently by blocking pain signals in the brain and reducing fever.