There is no one thing you can do to secure your computer 100%. You have to use the "castle" approach where you apply layers of security.
For example...
1) install an antivirus program and maintain the AV with the latest scan engine and definition files.
2) keep your computer up to date on all of the latest security patches, including 3rd party apps such as Java and Adobe.
3) Keep your computers on your private network behind a firewall or NAT so that you do not allow unsolicited traffic into your network.
4) Do not open email, or click on attachments from people you dont know and for those emails of people you do know, still be careful with attachments.
5) Run a URL filtering app on your computer or on your perimieter firewall. this will prevent you from accessing sites on the internet that have been flagged as comprimised or malicious.
6) If you have a wireless network, make sure that you are using the newer authentication and encryption mechanisms.
7) Use complex passwords, never share passwords, and educate other users on your network about good security practices.
JorgeM
Industrious Poster
4,007 posts since Dec 2011
Reputation Points: 294
Solved Threads: 544
Skill Endorsements: 115
those are 7 of the best tips you'll find on the net
caperjack
I hate 20 Questions
13,851 posts since Aug 2003
Reputation Points: 1,071
Solved Threads: 878
Skill Endorsements: 50
JorgeM's points are well taken. That said (and I know it isn't too feasible these days), the only 100% (more or less) sure way to avoid hacking is to stay disconnected from the Internet... :-) Firewalls, NAT's, A/V, malware scanners, rootkit scanners, and keeping a close eye on attachments you are sent are all appropriate.
rubberman
Posting Maven
2,571 posts since Mar 2010
Reputation Points: 365
Solved Threads: 305
Skill Endorsements: 52