It depends what you mean by differ?
Most differ from the brand in terms of price, manufacturing location, labelled as (marketing name), physical appearance etc. However the active ingredients are generally the same which means the brand and generics should provide the same levels of treatment, side effects and dosage requirements.
The best articles on this subject include:
https://www.worldtrustpharmacy.com/generic-prescription-drugs/faq/ (An excellent page explaining all you need to know about generic prescription drugs)