Non-steroidal anti-inflammatory drugs (NSAIDs) work by inhibiting the enzyme cyclooxygenase (COX) and subsequent prostaglandin synthesis. They are classified based on selectivity for COX-1 vs COX-2. Common side effects include gastric irritation, while selective COX-2 inhibitors were developed to reduce this but increase cardiovascular risk. NSAIDs are used for analgesic, antipyretic and anti-inflammatory effects in conditions like arthritis, but choice depends on safety profile and potency needed.