Medicines go through quite a nightmare before they can get to work at their supposed sites of action. Consider a pill sitting in your small intestine. The active molecules must obviously be lucky enough to get absorbed by the intestine, but the trouble is only just beginning for them. The intestine is capable of metabolising the drug, (which basically entails changing it into a different form, ideally so that it is inactive and/or more easily excreted). Then, it is carried in the portal venous system to the liver, which does the same, only much more avidly and much more resourcefully. If it gets past that, the hapless drug still has to get past the lungs, which are also capable of minor metabolism and excretion. Only then is it available to the systemic circulation to travel to, say, your sore joint to relieve the pain. In other words, only a fraction of the original drug actually gets to where you want it to.
Anyway, pharmacologists know this (by experiment) and they simply compensate for it by increasing the amount of active drug in the pill. In this way, they can get the correct amount to your body despite the amount of degradation and excretion that goes on en route.
Enter the dreaded grapefruit juice. This cunning little compound has the unexpected side effect of inhibiting (in fact, temporarily destroying) one of the major 'detoxification systems' in the intestine - cytochrome P450, mainly the isoenzyme 3A4. Now consider what happens if a drug is usually partially metabolised by this enzyme in the gut. Clearly, more drug will make it into the bloodstream than before, won't it? The result: higher drug levels in your body than anticipated. The result of this depends on the drug, obviously, but can lead to drug toxicity (e.g. if warfarin is used, it's effect will now be increased, perhaps inhibiting blood clotting to dangerous levels).
A few things need clarification though:
Firstly, not all drugs are affected!! In fact, comparatively few are. This stands to reason, for if the drug is not usually metabolised by the same gut Cytochrome p450 enzyme subset that grapefruit juice damages, drug levels will not be affected. Generally, if you are about to be prescribed a drug that is affected, your doctor will mention this; if you're concerned ask him/her.
Secondly, though the effect is usually pretty small, different people are affected to different amounts. Some show virtually no change, whereas others may show significant alterations to their drug metabolism.
Thirdly, the drug appears to have no effect on the liver's cytochrome P450 enzyme system, which is good, since the liver shoulders most of the drug metabolism burden. If it affected the liver, people would probably have banned grapefruit juice by now!
And lastly, the effect seems to have a half-life of about 12 hours. In other words, after stopping grapefruit juice, you should be back to normal in about 2.5-3 days. It apparently takes this long for the intestine to fully synthesise new cytochrome P450 isoenzymes.
P.S. All this is further evidence, if evidence were needed of the naturalistic fallacy ("natural = good")...!