1.Install a firewall and Anti-virus software:
Always install a good quality anti-virus software in your computer as it minimizes the chances of virus coming in your computer through internet or any other medium.
Firewall is helpful to prevent unauthorized authentication.
2.Always install original operating system:
Pirated operating system creates many loopholes so it's easy for virus to penterate operating system security and enter your computer. So always use original operating system.
3.Be cautious of Email-Attachments:
Do not open email you don't know what it is. As this is the simple trick used by hackers to install malicious programs in your computers.
4.Always make back-up of your data:
Back-up of data prevent data loss in case of virus attacks.
5.Periodic scan of your computer:
Always scan your computer in a week so that you can detect any malicious activity in your computer.
6.Always update your operating system and Anti-virus software:
Regular update of anti-virus and operating system keep up to date your computer security. Ultimately it minimize the virus risk.