Naproxen works by inhibiting the activity of cyclooxygenase (COX) enzymes, specifically COX-1 and COX-2, which play a crucial role in the synthesis of prostaglandins. Prostaglandins are lipid compounds that contribute to inflammation, pain, and fever. By blocking these enzymes, naproxen helps reduce these symptoms.