Once you get all nice and clean,
Hostman is a cool little (free) program that can help keep you that way.
You can learn all about your hosts file to understand the hows and whys - or you can just get it and install it, it doesn't care.
The Web of Trust (WOT) firefox addon can also be useful, despite its obvious flaws (websites receive red or yellow dots based on ratings by other users, according to a set of criteria that may or may not dovetail with your own, and of course may reflect subjective and irrelevant opinions, etc)
The more you can avoid going to websites that have bad stuff on them, the less likely you are to get bad stuff on your computer.
Firefox has other addons that can block, or alert you to the presence of, certain lumps of code - which Avira will also do, and I know that there is sometimes some controversy about that, but the boring but useful principle is that of reacting to code -
not content, which is a whole nother department in the store.