My professor from a network security class once said, "The only way to 100% protect a computer from hackers is to unplug the computer." With that being said, there are ways you can make it very hard for a hacker to compromise your computer while still making it useful for you.
The first thing you should do is assess the threat level to your computers and networks. Below is a list of threat levels that you can use to help determine the level of precautions you should take.
Level 1 (Low Threat): You use your computer and cellular phone for personal use. You work in an industry unrelated to governments or a military, politics, or anything controversial. You are not an outspoken individual. You have little or no enemies.
Level 2 (Elevated Threat): Are you politically active? Do you have controversial opinions or ideas? Are you a government contractor or work in the IT industry? Do you have some people who do not like you? If you answered yes to any of these questions, your computer systems may be targeted by hackers.
Level 3 (High Threat): You have access to highly sensitive information. You are outspoken about controversial ideas. You have enemies. You rely heavily on your reputation for your livelihood. You are wealthy. You or people you know are being persecuted. If any of these are true, your computer systems may be highly targeted.
Note: These threat levels are intended for individuals only and are not intended to be applied to large corporations or entities.
To protect yourself from hackers, it would be wise to know what a computer does with what the hackers want, data. A computer only does three things with the precious data the hackers so desperately want. It is either a) transferring the data, b) storing the data, or c) processing the data. Therefore, a hacker may attempt to intercept the data, read, copy, delete, or change the data, or the hacker may interfere with the way you process the data. In extreme cases the hackers may want control of your computer. If this happens, anything you can do with your computer the hacker(s) can as well, sometimes without you realizing it, such as turning on webcams and microphones.
Level 1: If you do get hacked, it will most likely be from a government agency being nosy, or the hacker is trying to gain a financial award. Standard precautions should be taken. Strong passwords, avoid public wi-fi and networks, be aware of phishing emails, using encrypted protocols and anti-virus programs should all be highly considered. Following these measures can help protect you from a hacker gaining your bank information, and save you a lot of headache when the hackers decide to go on a shopping spree.
Level 2: You may be a target for hackers. You want to take extra precautions on your computer and network. Consider encrypted email services such as Lavabit. Also, when accessing private servers, consider using VPN tunneling. This will protect the transferring of data point to point. To protect your stored data, you want to make sure your computer(s) and cell phone(s) are free of malicious software. Performing a factory reset on your cell phone and personal computer periodically is a good idea. Remember to backup important files you want to keep, as performing a factory reset will erase almost everything.
Level 3: You may be a high value target to a hacker. Consider installing firewalls and implementing a DMZ on your network. The standard procedure for protecting a highly targeted network is what is known as "Defense in Depth". This means multiple layers of security which will make it very hard for the hacker to succeed. You will want to have all the standard procedures for Level 1 and 2, and then some. Perform periodic backups of files to servers or computers isolated from the network. If an intrusion does occur, you may want to perform a full format of the computer(s). In this case, you will restore your computer(s) with the backups from a server isolated from the network. Check for unwanted hardware in your actually computer(s). Agencies have been known to implant back-doors physically in computers so they may gain access to it. If you spot one of these, it is best to physically remove it if possible.
Disclaimer: I nor this article will be responsible for any damage that is done by a hacker(s). Seek professional services if your computer(s) and network(s) need to be protected.