how does addiction work? (this is a rather open ended question, for now)
First, I'm not an expert on addictions, but....
I believe this should be broken down into (1) physical addiction and (2) mental addiction. They are related and similar, but different.
Physical addiction is basically constrained to substances - drugs, food, or chemicals in general. The body becomes accustomed to the chemical(s) being present and when they are not the physical symptoms can appear, shakes, appetite changes, sleeplessness, altered mental states, etc.
Mental addiction is slightly different. First, chemicals and substances can cause it, but also behaviors can cause it. The basic distinction from physical addiction is that mental addiction is largely constrained to the brain. Usually it develops from changes in the produced amounts and effectiveness of various chemicals in the brain such as dopamine and saratonin. This often leads to artifical feelings of happiness/contentment and such. People generally like feeling happy and as such can develop a strong desire, or addiction, to induce it.
While some things can cause physical addictions and some things can cause mental addictions, some things can also cause both.
I think it deserves mentioning that addictions usually don't happen from one experience. Repetition can play a role in the development of an addiction.
It may be wise to not take my word for it.
(edit: fixed the winky-smile above.
P.S. I'm not a biologist nor a phycologist.)
Separate names with a comma.