There are many ways when a hacker would try to scam you into receiving a file etc, so that you will take the bait and help him with the trojan/virus installation on your hard disk drive. If you need just one way to stop being hacked, the best way is to install an all-in-one solution with anti-virus, firewall and anti-spyware solution.
I personally use Norton Internet Security and update our subscription when required. I recommend Norton for their years and track records in the anti-virus arena.