A generic drug is the same as a brand-name drug in dosage, safety, strength, quality, the way it works, the way it is taken and the way it should be used. The U.S. Food and Drug Administration (FDA) requires that generic drugs have the same high quality, strength, purity and stability as brand-name drugs.
Not every brand-name drug has a generic version. When new drugs are first made, they have drug patents. Most drug patents are protected for 20 years. The patent, which protects the company that made the drug first, doesn't allow anyone else to make and sell the drug. When the patent expires, other drug companies can start selling a generic version of the drug. But, first, they must test the drug and the FDA must approve it.
Creating a drug is expensive. Since generic drug makers do not develop a drug from scratch, the costs to bring the drug to market are less. Therefore, generic drugs are usually less expensive than brand-name drugs. But generic drug makers must show that their product performs in the same way as the brand-name drug.Source: The U.S. Food and Drug Administration