According to Psychology Today, The most popular theory of addiction is the disease model. The disease model explains that addiction has a biological origin that causes changes in the brain. This model also accounts for the heredity of addiction or genetic predisposition. Studies of twins who have been separated at birth show that they are likely to develop addictions, despite growing up in different home environments.
I hope this helped you understand how addiction happens.