Testing kits, scientifically known as reagents, provide a preliminary indication of what substances are contained within a pill by causing a chemical reaction that will give a colour change. By interpreting the colour change you will be able to get a good idea of what active chemicals are within the pill you have.
The reagents are not without limitations however, as they are unable to determine purity, quantity, and may not be able to identify all active substances. The most effective way to establish what substance(s) are in your pill is to use a combination of reagents.