I myself once, and often experienced, even though the computer has been fitted with antivirus or other protection, can still get these attacks.
Tips below will try to explain the steps to prevent the entry of hackers:
1. Do it always storage for all your files. Get used to always make a backup or a backup for your files and folders, store them in separate places, outside your computer, such as in a CD or DVD.
2. Check if your computer has a good firewall. This needs to be done in order to prevent worms, viruses, Trojans, and spyware when they will infect your computer. But there are some applications / software that asks you to disable or deactivate the firewall, so consider the option to choose between active or non active
3. Do not just download a program or application. Program is downloaded from the site or place that you trust.
4. Beware of file attachments that are not clear or you do not know, because in it there is often a virus and can let hackers get into your computer system.
5. Check your browser and email settings for security. Try to make sure if you regularly have to delete the folder 'cookies'. This is done because cookies can potentially include threats that could damage your computer, or track your online activities do every day. Things you can do is set the "Internet zone", to "high" and tab "trusted sites" security level "medium low".
6. Beware of Active-X and JavaScript files. Both media files are often used by hackers to plant viruses and other harmful elements in your program.
7. Always install anti-virus and make sure to stay always updated.
8. If you've done, turn off your computer, and disconnect from the Internet, because hackers can not interfere / seeping into your computer system, if your computer is in a state of offline.
Thus the tips above. Hopefully useful.