I'll do my best to explain. So in chemistry, there is a thing called 'chirality' essentially this has to do with how a molecule is shaped. It's assessed by how a beam of polarized light that is passed through a molecule rotates.
There are a few different types:
Achiral, no change
Levorotary (L), Rotates anticlockwise
Dextrorotary(D), Rotates clockwise
The reason that it matters and what I was talking about above is that the sites in your body that a drug interacts with aren't universal. So if you have a (L) version of a drug that might have different effects and interactions than a (D) version.
A 1:1 mix of both (L) and (D) is called a racemic mix.
When you are talking about Brand name drugs, you're typically discussing a particular mix (e.g. Adderall XR is a 3:1 (D):(L) mix) or a particular conformation. That is not necessarily true with generics which may have a different ratio of (D):(L).
To give an example of how different the effects can be: Penicillamine (L) is used in the treatment of primary chronic arthritis.
Penicillamine (D) not only has no therapeutic effect, it is highly toxic.
Here's a link to some Wikipedia pages on it if you're interested: https://en.wikipedia.org/wiki/Chirality#Chemistry
https://en.wikipedia.org/wiki/Racemic_mixture
Do note that this is a bit of an oversimplification, but it's 3AM here so I hope you can forgive me.