How long does an allergy pill stay in your body?

Depends. Multiple factors influence the duration of a medication in the body. Firstly, some medications are "short-acting" while others are "long-acting". Then, different bodies process medications faster than others. Finally, conditions which can affect removal (e.g. Kidney diseases) can cause a delay in elimination of the medication and therefore lingering effects. Typically 4-6h, 12h or 24h.
Depends. Short acting allergy medicines like benedryl will usually be gone by 24 hours if not before. Longer acting ones, like claritin, (loratadine) zyrtec or Allegra can still be working even five days after the last dose. It may vary from person to person. As a general rule, after about three days there should be little effect though from most antihistamines.
Depends. Antihistamines can be divided into long-acting and short-acting. The long-actiing antihistamines (zyrtec, claritin, allegra, xyzal, (levocetirizine) & clarinex) last up to 5 days for inhibiting histamine. However, they are only effective for symptom control for about 24 hours. Short-acting antihistamines (benedryl) inhibit histamine for up to 48 hours, but are clinically effective for 4-6 hours.