Ibuprofen is a nonsteroidal anti-inflammatory drug (NSAID) that works by inhibiting cyclooxygenase (COX) enzymes, which reduces the production of prostaglandins. This action helps alleviate pain, inflammation, and fever, making ibuprofen commonly used for conditions like headaches, menstrual pain, and arthritis.