Generic and Name Brand drugs are essentially the same. The colour, shape, flavour may be different (Generics aren't allowed to look the same as their name brand counterpart), but the active ingrediants used in both are identical, as are their effects, side effects, dosages, and duration of effectiveness. In the US the FDA and in Canada Health Canada test generic drugs to ensure they meet the same standards as their name brand counterpart.
Sometimes your doctor or pharmacist will tell you if there is a generic version of the drug you are taking. However some doctors receive kickbacks from the drug companies so it is in their interest to prescribe the name brand drug. If you pay your own drug costs, come right out and ask your doctor and pharmacist if there is a generic version of the drug you are taking, you can save yourself a good chunk of change.