Once your computer is secure, it's time to reset all your passwords. That means your Windows account passwords and online account passwords. Remember to make them strong.
Don't just change the accounts that were hacked. Your ex could have all your passwords. You don't want him getting into things like your bank account.
Be sure to change your account security questions as well. These are usually based on personal information. Your ex might know the answers.
Consider taking the opportunity to start using a password manager. This will store and encrypt all your passwords. Click here for a free, solid password manager.
Hopefully, changing your password will keep your ex out. However, he might have locked you out. What can you do if you can't get in? Learn how to recover a hacked account here.