Several reasons:
From a psychological point of view, a person who takes nicotine has been conditioned to associate nicotine with pleasure. It’s similar to how people associate junk food with good taste and how it’s difficult to give up junk food completely.
However, this by itself cannot explain why nicotine is addictive. Biologically, nicotine mimics dopamine, a neurotransmitter that (among other things) makes people feel good. After a person takes nicotine, it’s as if their dopamine levels have suddenly become too high; to compensate, the brain starts producing less dopamine, and once the nicotine breaks down, dopamine levels will drop. When dopamine levels drop, bad things happen (depression, headaches, lack of coordination, and so on), and the person will need some external source of dopamine. In most cases, that external source is nicotine, and after taking nicotine to counter the negative effects of low dopamine levels, the cycle continues. This leads to physical dependence on the drug and makes quitting nearly impossible. Should the person attempt to quit, he/she would suffer withdrawal symptoms for a long time and this aversion to withdrawal symptoms makes it extremely hard to quit.