1.Check a programme from virus before you download. Visit for online testing (www.virustotal.com)
2.Turn on your firewall. Visit (www.comodo.com)
3.Always keep your software and antivirus updated.
4.Use dynamic IP address instead of static IP.
5.Use proxy or VPN which help to mask your IP address.
6.Do not sign in to untrusted website.
7.Do not download from unknown sources
8.Be aware from click jacking attack like make sure while click on like button etc… as this attack work on background of website and take over the complete control of PC