If you get an attachment via email, If you do not trust/know the sender do not open it without scanning for viruses first.
Set your windows machine to "show extensions of known file types". A guide is linked below.
http://www.howtohaven.com/system/show-file-extensions-in-windows-explorer.shtml
If you receive files with extensions .dll .cab .js .exe you should run as far away from them as possible.
http://blog.avira.com/rokku-ransomware-made-professional/