Hi, thank you for contacting JustAnswer.com. My name is Russell. I will do my best to provide the right answer to your question.
There are several things to do in order to prevent hacking, takeover, etc. And my first choice may not agree with everyone else's:
1. don't visit websites of ill repute. It sounds old-fashioned, but basically such sites are designed by people of ill repute. And such people like to use every link, every web page loading, to try to drop all sorts of stuff onto your computer.
2. This is more conventional: have good security software installed. Good security software will provide both
A. firewall protection, for network and web page access, and
B. anti-virus (anti-malware, anti-spyware, anti-adware) protection.
3. Some other functions in good security software include this and that and the other, but A and B above are the real essentials.
(So, what is 'good' security software?: it's generally a major name, whether it is expensive paid-for or subscription security software (such as McAfee, Symantec, 'Norton', TrendMicro, etc.) or cheap/free such as AVG Free, Avast.com, etc.)
4. Keep your computer completely updated. If Windows, keep Windows Update set to Automatically check on security patches and update your Windows version (but not necessarily to Windows 10, which is altogether another type of update.)
5. for Apple computers, the focus is somewhat different, but rule (1) above applies just as much, and though rules (2) and (3) and (4) are different in detail from the names and the procedures for Windows PCs, the principles are completely the same in general.
And no, Apple computers are no longer at all immune to virus infection etc. That applies only to really old systems that preceded MAC OS X.
6: for Android handhelds, there is an important security hole, esp. in older versions. You need to test for that security hole, and if it is found, get your phone's Android version patched for the security hole, or else have its Android version updated to one of the recent versions which is issued with that security hole plugged. The security hole is called the Stagefright exploit.
The test for it may be loaded from
If you have an Apple handheld device, they also have their security hole that needs to be checked for and patched - but I admit I know less about it, so please tell me if you have an iPad or iPhone, and I will look up the specifics and get back to you with the details of what to do.