Thank you for contacting JustAnswer.
I am sorry to hear about the problems you are experiencing with this man. It sounds like you have discovered that his previous behaviors are repeated over and over again and that you deserve better than this. I am glad to hear that.
The first step is to be clear with yourself that you are done allowing this man to treat you disrespectfully XXXXX XXXXX no longer allow him in your life. The next step is to set limits with him the next time he shows up by letting him know that you will no longer be talking with him . . . and then stop talking with him. If he persists in following you or trying to talk to you, you can ignore him, walk away (being sure to stay in a safe area) or calmly let him know that if he persists you will file a complaint of stalking. Remember to avoid showing him any emotion, including anger or frustration as this will only fuel his behaviors.
You may find the following website to be helpful: http://www.ncvc.org/src/main.aspx?dbID=DB_People196
In the meantime, you may want to begin to focus on examining what may have prompted you to allow yourself to be treated this way to begin with and work on improving your self esteem. Individual therapy could be helpful for this. No one deserves to have to live their life in fear of an ex and that includes you. Getting help from the authorities if he refuses to take no for an answer may set a limit for him that may make him back off.
I hope this answer is helpful. Please let me know if I can clarify further.