If you are receiving e-mail messages that indicate that someone is trying to reset your Apple ID password, they may be phishing scams. Do not click any links in those e-mail messages, and if you make the mistake of doing so, do not provide your current Apple ID password on the page you are directed to.
Unfortunately, in this case, there's nothing to be done except treat those messages the same way you would any other spam.
The other possibility is that someone is actually trying to reset your Apple ID password. This may be due to a malicious attack, but more likely, it's just someone who thinks your Apple ID is actually theirs (due to a typo, faulty memory or something similar) and is trying to "regain" access. In any case, this is merely an annoyance, but you can put an end to it by enabling two-factor authentication on your Apple ID. This will require an additional piece of information that only you will possess in order to even start the password reset process.
If you are actually seeing your password getting changed, and are having to reset it yourself to regain access, you are being hacked. This could be because your password is not strong enough to withstand a brute-force attack by a botnet. It could also be because the attacker already has access to your e-mail address, and is able to intercept the reset e-mail and complete the reset process. Because of that danger, you should change the password for the e-mail account associated with your Apple ID. You should also change the password for your Apple ID, making sure that it is a strong password, and enable two-factor authentication as mentioned above.
Note that this is definitely not due to any kind of malware on your computer