Generic drugs are only cheaper because the manufacturers have not had the expenses of developing and marketing a new drug. When a company brings a new drug onto the market, the firm has already spent substantial money on r&d, marketing and promotion of the drug. A patent is granted that gives the company that developed the drug an exclusive right to sell the drug as long as the patent is in effect.
As the patent nears expiration, other manufacturers can apply for permission to make and sell generic versions of the drug; When multiple companies begin producing and selling a drug, the competition among them can also drive the price down even further.
An example of a generic drug, one used as a pain killer, is paracetamol tabs. A brand name for paracetamol is Panadol. (panadol goes for about 12bob for two tabs, its generic goes for 1bob a tab )
Key point is that generic drugs contain the same active ingredient as original brands, they may just differ in shape and colour, but achieve the same result.