Maxy,
When you say a Windows "thing" pops up, are you referring to a browser pop-up or do you mean a true Windows message box?
Both are somewhat serious, but the browser pop-up is somewhat easier to clean. If you're experiencing a real Windows message pop-up, then you have some serious issues.
First, STOP clicking on the button that says "Click here" or whatever that causes you to download something. This is a widespread trick to lull people into downloading a trojan.
Second,
- What version of Windows are you running?
- What is the specific trojan that Avast warns you and says you have installed?
- What software firewall are you using? You mention Windows Firewall - is this running? Have you authorized any exceptions in it's rules to permit a new program?
- Please run this program, HijackThis, and review the log to see what is autorunning on your PC. If you need help, post the results log, here, in this thread
Note, posting the results in this thread may result in personally identifying information being publicly revealed.
http://www.download.com/Trend-Micro-HijackThis/3000-8022_4-10227353.html
- Are you running Windows Defender? If so, what are the scan results from Windows Defender? If you aren't running it, why not?
At this point, I don't think, based on what you've said, you're PC is infected with a trojan. Avast seems to be doing its job and warning you on malware when you try to download (stop doing that!). You do seem to have a resident program, either in your browser or OS, which is causing that message window to appear and make you think you need to do something.