We figured out what to do if an infection has already occurred. But, as they say in medicine, the prevention of the disease is better than its treatment. To protect yourself from miner scammers, you need to follow a few simple recommendations:
Do not download files from little-known or unverified sites. Even if you are a fan of torrents, use popular resources for downloading (bittorrent.com, piratbit). If for some reason you nevertheless went to a dubious resource, open the task manager and see if the CPU is loaded.
Install an antivirus on your computer (preferably a licensed version). For example, you can use Kaspersky, which is systematically updated and improves PC protection. True, he uses considerable resources, but the security is worth it.
Special utilities for scanning a computer (Malwarebytes, AdwCleaner) will not be superfluous. They are unlikely to prevent a threat from entering the hard drive, but they will be able to identify a malicious file in time and delete it. Also, the premium version of Malwarebytes can protect against browser mining. This program simply blocks the sites on which it detects a mining script.