Than you should find out where it came from - ie. somebody hacked your webhoster, you use some vulnerable script next to your Magento installation, or is your computer compromised and SSH / SCP / FTP access stolen, or ... whatever.
This is really important - if there is some kind of trojan, you have to know the way your Magento was hacked to be able to prevent such future failures.
You have to also clean your Magento installation - this trojan can steal your customers payment details etc. - so this is very important and necessary step.
And finally take precautions - depending on previous research. And yes - there are webhosters with antiviruses - check: http://www.google.com/search?hl=en&q;=hosting+antivirus+protection&aq;=f&oq;=&aqi;=