If your Mac has become infected, there are things you can do in order to remedy the situation.
1. Download and install avast free antivirus and CCleaner from download.com.
2. Download Malwarebytes free from the Malwarebytes website by typing Malwarebytes free Mac version into google and selecting the first link.
3. Install all programs.
4. Configure avast, CCleaner and Malwarebytes by following the instructions on the Windows guide.
5. Run a full system scan and Boot time scan. Delete all infections found.
6. Run Malwarebytes custom scan. Delete all infections found.
7. Run CCleaner
8. If your Mac still does not work right, you may need to reinstall Mac OS. (Separate Guide)
Please note: No person or company paid me to say anything about any of the topics above. These are my opinions and what I have observed using the program personally. Your experience may vary. I am not responsible for any data loss that may occur. Use my guides at your own risk.