Nonsteroidal anti-inflammatory drugs (NSAIDs) reduce pain, swelling, stiffness and inflammation. Two drugs in this category, ibuprofen and naproxen, also reduce fever. NSAIDs work by reducing the body's production of prostaglandin, an enzyme that sends pain messages to the brain.