Install antivirus software, and update it regularly
Make sure to set you're antivirus software to start when you turn on your computer since it only protects your computer when it is running.
Malware is constantly changing so it is important to set your software to auto-update so it will be able to detect the new malware that is being created daily.
FILE SHARING IS VERY RISKY
Be careful when downloading any file
Almost any file that you download has the possibility of containing malicious code. Make sure that when you download a file that you save it to your hard drive and virus scan before you open it.
Update patches for your operating system
Vulnerabilities in operating systems are discovered daily and it is important to get the updates for them on a weekly basis in order to keep your computer safe.
Never install or run any software from a website you aren't sure you can trust
Just say "No," or if given the option, install it on your hard drive and virus scan.
Make sure the read the user agreements, privacy policies, or other disclaimers before downloading your installing software.
Some software will contain spyware and by accepting the user agreement you are giving permission to download spyware on to your computer.
Use a firewall to further protect your computer from malicious code.