Sometimes, drug companies produce a drug which works the same way as a drug that already exists on the market. Drug companies must prove the following to health authorities in order to put drugs on the market:
The active ingredient in the new pill is the same as the active ingredient in the original pill
After administering the new medication to different people, the concentration of the drug in the blood stream is no different than the concentration of the other drug.
The new drug has to be approved as an alternative of an already-existing drug, and is only approved when both of these terms are met. This is why, despite the fact that the pills may have different shapes, colors and names, they are interchangeable and work the same way.