It used to be easy. You had a headache? You took a couple of aspirins. You had a tooth pulled? A muscle or joint ache? You took a couple of aspirins. You had a fever? You took -- you guessed it. You felt bad enough to call the doctor, and what did he tell you to do before you called him in the morning? Remember?

Some people liked their aspirin mixed with caffeine -- Anacin, for example. Anacin led the market for years, and new studies suggest that caffeine may indeed enhance aspirin's analgesic (pain-killing) effects.

Things got a little complicated with the advent of acetaminophen, widely known as Tylenol -- and now Panadol. After some bad press about aspirin-caused stomach irritation and gastrointestinal bleeding, Tylenol did very well, very quickly.

Then came Excedrin, a gutsy little combination of aspirin, acetaminophen and caffeine, that even managed to get itself its own headache.

Today, despite the cyanide scare of '82, Tylenol controls the largest single bloc of the over-the-counter (OTC) painkiller market -- about a 35 percent share of the estimated $1.4 billion Americans spend annually to soothe their aching bones, feverish brows, throbbing heads . . .

But who knows about tomorrow? Enter ibuprofen. As the prescription drugs Motrin and Rufen, it has been easing the pain and inflammation of arthritic flare-ups and menstrual cramps for about a decade. Now, with its patent due to expire next May, it (or its parent company, the British drug manufacturer, Boots) is making a bid for a piece of that golden over-the-counter pie.

The Food and Drug Administration approved ibuprofen for OTC use beginning last summer. As Advil, marketed by American Home Products -- makers of Anacin, Preparation H and Dristan -- and as Nuprin, Upjohn's OTC version of its own Motrin, it is expected to move in on the big boys.

Not, however, without some challenges to its safety, even from several scientists on the panel that recommended its FDA approval.

But even as the new kid on the block is trying to stake out his territory, the old favorites are repackaging, reformulating and flooding the market with Maximum Strength this and Arthritis Strength that and Extra Strength the other.

Which raises a whole new realm of consumer confusion. In the first place, which drug to take when for what kind of problem? In the second place, which version of which drug?

The three principal OTC painkillers are not always interchangeable. It depends on why you want them, what other health problems you have and what other medicines you are taking.

Acetaminophen, for example, will lower fevers and reduce pain. But it does not reduce inflammation which may be the principal cause of pain from arthritis, some headaches and an assortment of strains and sprains.

Aspirin lowers fevers, reduces pain and reduces inflammation. It affects the blood-clotting mechanism and may erode the delicate tissues of the stomach and gastrointestinal tract. Persons taking anti-coagulants (blood thinning medicines) or who have stomach ulcers should avoid products containing aspirin. In some cases, aspirin's anti-clotting characteristic may be beneficial. New studies suggest it can prevent fatal heart attacks in a normally high-risk group of patients with certain types of angina. On the down side, its use during bouts of flu or chicken pox in children and adolescents might be linked to the potentially-deadly Reye's syndrome, although no cause and effect has been established.

Ibuprofen, developed as an anti-arthritis medicine, works much like aspirin, only more so. It is a strong anti-inflammatory agent, with a smaller typical dosage than either aspirin or acetaminophen. However it may be hard on the stomach. Anyone sensitive to aspirin is likely to be sensitivie to ibuprofen. Its misuse -- or even overly casual use -- might, its detractors say, compromise patients with kidney disease or hypertension. It could, for example, reverse the benefits derived from diuretics.

But an overdose of ibuprofen is rarely fatal, unlike both aspirin and acetaminophen.

Before popping pills, remember that some pain can be managed through relaxation techniques. And fevers, unless they are very high, may have a beneficial function. Their discomfort often can be eased, in child or adult, by cool (not cold) compresses or warm baths. Just because a drug is sold without a prescription doesn't mean it's safe for everyone in all circumstances.

Some tips for pill takers: Pregnant women and small children should never take any painkiller without a physician's approval. The protective effects of buffering agents designed to shield the stomach against aspirin are not completely established. They may reduce gastric bleeding, but are often high in sodium. Coatings that keep aspirin from dissolving until it exits the stomach may protect the stomach, but may take longer to act. However this may enhance aspirin's anti-inflammatory agent.

Finally, keep in mind that best selling doesn't necessarily mean best.