It is believed that the genetic aspects of addiction are related to the way peoples’ brains handle neurotransmitters.
For example, a person with genetically low levels of dopamine (the “pleasure chemical”) might discover that a certain drug raises the level and makes him feel better — without, of course, knowing exactly what happened.
If that person continues to use the drug to overcome the deficiency in dopamine production, there will come a time when the brain no longer produces it at anything like a sufficient level without the presence of the drug. At that point, ceasing drug use is no longer an option as far as that individual is concerned. They now need the drug to function normally. This can happen to people who start off with normal dopamine levels, as well, but they are rather less likely to seek the relief to begin with.
This is only one example. There are hundreds of neurotransmitters, and all of their functions are set genetically — at least initially. The dopamine issue is a common one, but not by any means the only one.