How does celebrex help arthritis?

This medication is a nonsteroidal anti-inflammatory drug (NSAID), specifically a COX-2 inhibitor, which relieves pain and swelling (inflammation)

It is used to treat arthritis, acute pain, and menstrual pain and discomfort. … Decreasing prostaglandins helps to reduce pain and swelling.