Virus
Viruses are small software programs , that attach themselves to a computer or a file ,
and then circulate themselves to other files . Virus can erase some important bootable files on your computer so that computer can't start .
Virus attaches itself to some executable program, and become part of that executable program .
Virus propagates more slowly than worms , Virus needs other programs , or user action to propagate .
Worms
Worms also software programs that propagates it self from computer to another computer in network and to Internet .
Worm is a self replicating program ,usually slow down networks and even crash also .
To protect your computer from virus and worms, run Anti virus software everyday and updated Antiviurs for new definitions ..
Trojan horse
Trojan horse also a small software program , it's unauthorized program . these programs can bind to some other executable programs and install silently , without knowing the computer user , they also hide from Firewall programs .
Trojan programs can't duplicates unlike worms or virus , they usually opens some TCP port on the victim computer .It allows the hacket to access the data in the computer .
Trojan horse will generally have server and Client part
the hacker can upload and download and also can install softwares on victim's computer .
So we should have to check the file extension before open and also scan with Updated Anti-virus software . Trojan programs bind to other files like AVI , other exe programs and .JPG like that ..
so some files like myphoto.JPG.exe the last extention is most important thing . some extension of trojan programs are .VBS , .BAT , .COM ..
so check the file extention and scan before you open any file