Although different NSAIDs have different structures, they all work by blocking cyclo-oxygenase (COX) enzymes. There are two main types of COX enzymes: COX-1 and COX-2. Both types produce prostaglandins; however, the main function of COX-1 enzymes is to produce baseline levels of prostaglandins that activate platelets and protect the lining of the gastrointestinal tract, whereas COX-2 enzymes are responsible for releasing prostaglandins after infection or injury. Prostaglandins have a number of different effects, one of which is to regulate inflammation.
NSAIDS have antipyretic activity and can be used to treat fever.   Fever is caused by elevated levels of prostaglandin E2 , which alters the firing rate of neurons within the hypothalamus that control thermoregulation.   Antipyretics work by inhibiting the enzyme COX, which causes the general inhibition of prostanoid biosynthesis ( PGE2 ) within the hypothalamus .   PGE2 signals to the hypothalamus to increase the body's thermal set point.   Ibuprofen has been shown more effective as an antipyretic than paracetamol (acetaminophen).   Arachidonic acid is the precursor substrate for cyclooxygenase leading to the production of prostaglandins F, D & E.
In the past several years, some newer medications have come on the market; these are commonly referred to as COX-2 inhibitors . Remember, all NSAIDs work against cyclooxygenase (COX). Traditional NSAIDs (. Ibuprofen, Motrin, Aleve) work against both COX-1 and COX-2. COX-1 and COX-2 are both types of cyclooxygenase enzymes that function in your body. The new medications (. Celebrex) work primarily against COX-2, and allow COX-1 to function normally. Because COX-1 is more important in producing the protective lining in your gut (gastric mucosa), these newer NSAIDs are believed to have less of a risk of causing stomach ulcers.