think my computer has a virus need to change my password
If your computer has virus and you change the password it WONT solve the problem, because that hacker can still steal and read your new password if the virus is still in your computer. The real solution is to get your antivirus and run a full scan for your computer and delete all the viruses, and then change the password as soon as possible!
Changing your password will not do anything. If you have a virus you have to run a virus scan to remove it.
I think that's probably not the best idea - you need to get rid of the virus first.
how do you get rid of a virus on iMac
Do you mean that, or email hacked? Secure a hacked account - https://uk.help.yahoo.com/kb/account/secure-account-sln3516.html Check for a mail forwarding address and account activity.