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.
A variety of allergic or allergic-like NSAID hypersensitivity reactions follow the ingestion of NSAIDs. These hypersensitivity reactions differ from the other adverse reactions listed here which are toxicity reactions, . unwanted reactions that result from the pharmacological action of a drug, are dose-related, and can occur in any treated individual; hypersensitivity reactions are idiosyncratic reactions to a drug.  Some NSAID hypersensitivity reactions are truly allergic in origin: 1) repetitive IgE -mediated urticarial skin eruptions, angioedema , and anaphylaxis following immediately to hours after ingesting one structural type of NSAID but not after ingesting structurally unrelated NSAIDs; and 2) Comparatively mild to moderately severe T cell -mediated delayed onset (usually more than 24 hour), skin reactions such as maculopapular rash , fixed drug eruptions , photosensitivity reactions , delayed urticaria , and contact dermatitis ; or 3) far more severe and potentially life-threatening t-cell-mediated delayed systemic reactions such as the DRESS syndrome , acute generalized exanthematous pustulosis , the Stevens–Johnson syndrome , and toxic epidermal necrolysis . Other NSAID hypersensitivity reactions are allergy-like symptoms but do not involve true allergic mechanisms; rather, they appear due to the ability of NSAIDs to alter the metabolism of arachidonic acid in favor of forming metabolites that promote allergic symptoms. Afflicted individuals may be abnormally sensitive to these provocative metabolites or overproduce them and typically are susceptible to a wide range of structurally dissimilar NSAIDs, particularly those that inhibit COX1. Symptoms, which develop immediately to hours after ingesting any of various NSAIDs that inhibit COX-1, are: 1) exacerbations of asthmatic and rhinitis (see aspirin-induced asthma ) symptoms in individuals with a history of asthma or rhinitis and 2) exacerbation or first-time development of wheals or angioedema in individuals with or without a history of chronic urticarial lesions or angioedema.