First I would try running an anti-virus sweep, if you dont have anti-virus software, avast is good and free:http://www.avast.com/eng/down_home.html
Then I would run some anti-spyware software, these two work good together (and, of course, are free):
If all else fails, you can do the job manually with these two powerful programmes:
But if you use those last two, BE CAREFUL!!! You can mess your computer up just as easily as you can fix it (possibly more so).
And for future prevention, make sure you have your internet options set to prompt you before downloading anything or running any scripts; and make sure you know what your're downloading, if you arn't exactly certain what it is, quarantine it and scan it with some anti-virus software before running it.