What is the psychology behind a person who refuses to commit but is borderline obsessed with you and won’t leave you alone?

I dumped a guy because he wouldn’t commit and now he is harassing me at this point.
What is the psychology behind a person who refuses to commit but is borderline obsessed with you and won’t leave you alone?
Post Opinion