All the medicines people take - tablets, capsules, powders, you name it - are made of a variety of different chemicals. There is the "active pharmaceutical ingredient", which is the actual drug molecule, and then there are all the "excipients", the other ingredients that are mixed in to create the desired shape, flavor, appearance, and performance. Each one of these materials is manufactured or processed in labs and factories, using a variety of techniques. When the molecule must be synthesized by a chemical process, various chemical solvents are used. Some of these are fairly innocuous. Few people would worry to discover that the pill they took still contained a little bit of ethanol (the alcohol people drink liberally). Others are a bit nastier. Acetone (nail polish remover), formamide (the traditional fluid for preserving dead specimens), chloroform (the classic "knock-out" chemical when applied to a rag), and benzene (a carcinogen widely used in the petroleum industry) are a few of dozens of examples. Manufacturers do what they can to remove the solvents from their products by a variety of drying techniques. The little bit that remains behind is referred to as "residual solvents".
Because residual solvents are recognized as toxic chemicals, regulatory agencies (like the FDA in the United States of America, and its counterparts in other countries around the world) set guidelines on how much of each solvent may be present in drug products. These guidelines are set using known toxicity information, with a large safety factor built in as well. The goal is to ensure that no one who is taking medication will be able to ingest enough of any residual solvent to do them harm. It should come as no surprise that the more harmful a residual solvent is, the lower the limit that is assigned to it.
Most regulatory agencies rely on a published document to set the limits for residual solvents. In the United States, that document is the United States Pharmacopoeia. The European Union has the European Pharmacopoeia, and Japan has the Japanese Pharmacopoeia. These three bodies often work together to present a uniform standard to global pharmaceutical industries. This is done under the name "International Conference on Harmonisation" or ICH. The limits and guidelines for residual solvents established by the ICH were adopted by each of the pharmacopoeias it represents, creating a fairly worldwide standard. (Many nations use one of these pharmacopeias rather than maintaining their own, though there are some exceptions, such as Russia and Brazil.)
The ICH set limits for 59 different residual solvents, and established guidelines on how to determine limits for all others. Once adopted by a nation's regulatory bodies, drug manufacturers are responsible for testing and ensuring that all drug products they make meet these safety limits. In the United States, these rules became effective in the summer of 2008. It caused quite a stir in the pharmaceutical industry - not because solvents were present at high levels, but because the testing involved was complicated and expensive.
Thanks to the strict regulations, residual solvents are akin to a bad dream. They may be there, but they can't hurt you. Better yet, because of all the regulations, manufacturers are making a greater effort to eliminate the use and presence of solvents whenever possible. As a result, often times, residual solvents won't be there at all.