The main technique that hackers use for stealing your passwords is phishing. The best solution is to install a good antivirus and keep it updated.