Keeping your operating system up to date.
Using up to date anti-virus software.
Not opening an email attachment unless you are expecting it and know the source (many email servers scan emails with...